Skip to content

Add error response format integration test#100

Open
luisvlz0 wants to merge 2 commits into
opencost:mainfrom
luisvlz0:luis/error-response-format
Open

Add error response format integration test#100
luisvlz0 wants to merge 2 commits into
opencost:mainfrom
luisvlz0:luis/error-response-format

Conversation

@luisvlz0

Copy link
Copy Markdown

DESCRIPTION

Adds an integration test for OpenCost API error response formatting. This test verifies that invalid API requests return a structured error response instead of an unexpected or malformed response body.

CHANGES

  • Adds a new error_response_format integration test under test/integration/api
  • Adds a test.bats file to run the test
  • Validates that API error responses include the expected format and status behavior

MOTIVATION

This helps ensure API clients receive consistent and predictable error responses when requests are invalid. It also provides regression coverage so future API changes do not accidentally break error response formatting.

TESTING

This test can be run from the new test directory using the included Bats test file.

Signed-off-by: luisvaldez2h@gmail.com

Signed-off-by: luisval2h <133304145+luisvlz0@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 19:47
@luisvlz0 luisvlz0 requested a review from a team as a code owner June 15, 2026 19:47

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants