Skip to content

Feat: Improve error message#8

Merged
filipe1309 merged 4 commits into
mainfrom
feat/improve-error-message
Sep 29, 2025
Merged

Feat: Improve error message#8
filipe1309 merged 4 commits into
mainfrom
feat/improve-error-message

Conversation

@filipe1309

Copy link
Copy Markdown
Contributor

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 the Makefile.

API error response enhancements:

  • All API error responses now include the request path and, where applicable, more specific error details (e.g., parsing errors, invalid token format) to help with debugging and client-side handling. (cmd/api/main.go) [1] [2] [3] [4]

Build system cleanup:

  • Removed an unnecessary blank line in the Makefile for improved readability. (Makefile)

@filipe1309 filipe1309 requested a review from Copilot September 29, 2025 00:39
@filipe1309 filipe1309 self-assigned this Sep 29, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cmd/api/main.go Outdated
Comment thread cmd/api/main.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 29, 2025

Copy link
Copy Markdown

📊 Test Coverage Report

Status: ✅ PASSED
Result: Coverage requirements met

🎯 Coverage Details:

"Total coverage threshold (80%) satisfied:\tPASS\nTotal test coverage: 98.5% (66/67)\n"

📋 Coverage Requirements:

  • Minimum Threshold: 80%
  • Coverage Profile: ./cover.out
  • Coverage Mode: atomic

🔧 Test Configuration:

  • Go Version: go version go1.25.1 linux/amd64
  • Race Detection: enabled
  • Timeout: 2 minutes
  • Test Packages: ./...

@filipe1309 filipe1309 merged commit 44d04ea into main Sep 29, 2025
4 checks passed
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.

3 participants