Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add API response classes for success and error #44

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

Lapotor
Copy link
Collaborator

@Lapotor Lapotor commented Nov 26, 2023

This commit introduces standardized API response classes to enhance consistency and clarity in handling server responses. Two classes have been added: one for successful responses (ApiSuccessResponse) and another for error responses (ApiErrorResponse). These classes encapsulate the necessary information, such as status codes, messages, and additional data, providing a uniform structure for API interactions.

By adopting these response classes, we aim to streamline error handling and response processing across the codebase. Developers can now rely on a consistent format when dealing with API responses, promoting better code maintainability and reducing the likelihood of errors related to response parsing.

Signed-off-by: Valentin Sickert <[email protected]>
Signed-off-by: Valentin Sickert <[email protected]>
@Lapotor Lapotor added this to the v1.0.0 milestone Nov 26, 2023
@Lapotor Lapotor requested a review from whyauthentic November 26, 2023 04:09
@Lapotor Lapotor self-assigned this Nov 26, 2023
@whyauthentic whyauthentic merged commit 2fa9025 into main Dec 2, 2023
1 check passed
@whyauthentic whyauthentic deleted the feat/customDefaultResponse branch December 2, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants