Skip to content

feat: Make response status code configurable#53

Merged
shreddedbacon merged 2 commits intomainfrom
feature/issue/PLAT-489/error-code-configurable
Jul 24, 2025
Merged

feat: Make response status code configurable#53
shreddedbacon merged 2 commits intomainfrom
feature/issue/PLAT-489/error-code-configurable

Conversation

@dimiechatz
Copy link
Contributor

@dimiechatz dimiechatz commented Jul 24, 2025

Related issue: https://amazeeio.atlassian.net/browse/PLAT-489

Changes

  • Introduced default-http-response-code flag to make the default response status code configurable. The default value is set to 404.
  • Added test case for the change.

Copy link

@anothertobi anothertobi left a comment

Choose a reason for hiding this comment

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

The logical change looks good 👍

Just one small thing for the naming: Using something like defaultHTTPResponseCode instead of defaultHTTPErrorCode would highlight that this is indeed the default response status code since it's used as the response code for all requests that don't specify a valid int X-Code header.

@dimiechatz
Copy link
Contributor Author

Good point! I'll update the naming accordingly.

@dimiechatz dimiechatz changed the title feat: Make error code configurable feat: Make response error code configurable Jul 24, 2025
@dimiechatz dimiechatz changed the title feat: Make response error code configurable feat: Make response status code configurable Jul 24, 2025
Copy link

@anothertobi anothertobi left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Leaving this for @shreddedbacon for a final review.

Copy link
Member

@shreddedbacon shreddedbacon left a comment

Choose a reason for hiding this comment

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

Thanks @dimiechatz and @anothertobi. All good from me, I'll release this and do a charts bump today.

@shreddedbacon shreddedbacon merged commit 1767d27 into main Jul 24, 2025
14 checks passed
@shreddedbacon shreddedbacon deleted the feature/issue/PLAT-489/error-code-configurable branch July 24, 2025 21:25
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