Skip to content

Added response.go, consistent error response#13

Merged
Howard-nolan merged 1 commit intomainfrom
feature/error_handling
Nov 13, 2025
Merged

Added response.go, consistent error response#13
Howard-nolan merged 1 commit intomainfrom
feature/error_handling

Conversation

@Howard-nolan
Copy link
Owner

Change Summary:

  • Added a response.go helper to centralize JSON response formatting.
  • Introduced a consistent JSON error shape used across all HTTP handlers.
  • Updated handlers to use shared helpers instead of writing responses inline.

How It Works:

  • response.go has WriteJSON and WriteError functions

Additional Notes (optional):

  • Existing error responses have changed shape; any clients depending on the old error body format may need to be updated.
  • Follow-up: we can extend ErrorResponse with request IDs / correlation IDs or more structured error codes if needed.

@Howard-nolan Howard-nolan merged commit a66f1f1 into main Nov 13, 2025
github-actions bot added a commit that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant