Feat: Improve error message#8
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances error messages across multiple API endpoints by standardizing the error response structure to include request path information and additional error details for better debugging and client-side error handling.
- Adds "path" field to all error responses to identify which endpoint triggered the error
- Includes "details" field with specific error information for parsing errors and validation failures
- Removes unnecessary blank line in Makefile for cleaner formatting
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/api/main.go | Enhanced error responses with path and details fields for better debugging across all API endpoints |
| Makefile | Removed unnecessary blank line for improved formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
atomaz
approved these changes
Sep 29, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📊 Test Coverage ReportStatus: ✅ PASSED 🎯 Coverage Details:📋 Coverage Requirements:
🔧 Test Configuration:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the error response structure for several API endpoints in
cmd/api/main.go, making error messages more informative and consistent by including additional context such as error details and the request path. There is also a minor cleanup in theMakefile.API error response enhancements:
cmd/api/main.go) [1] [2] [3] [4]Build system cleanup:
Makefilefor improved readability. (Makefile)