Skip to content

Updating Inconsistent/Inaccurate HTTP Response Codes #1598

Draft
Andrew-Bonner wants to merge 3 commits into
OpenEnergyDashboard:developmentfrom
Zach-O-Bates:Problem-18
Draft

Updating Inconsistent/Inaccurate HTTP Response Codes #1598
Andrew-Bonner wants to merge 3 commits into
OpenEnergyDashboard:developmentfrom
Zach-O-Bates:Problem-18

Conversation

@Andrew-Bonner
Copy link
Copy Markdown

Description

This change was implemented to standardize HTTP status codes across multiple routes in the codebase. Previously, several routes in OED returned inconsistent or inaccurate status codes, which could complicate debugging and maintenance over time. By aligning these responses with proper HTTP standards, this update improves clarity, reliability, and the ability to debug other issues in the future.

Fixes #1573

(In general, OED likes to have at least one issue associated with each pull request. Replace [issue] with the OED GitHub issue number. In the preview you will see an issue description if you hover over that number. You can create one yourself before doing this pull request. This is where details are normally given on what is being addressed. Note you should not use the word "Fixes" if it does not completely address the issue since the issue would automatically be closed on merging the pull request. In that case use "Partly Addresses #[issue].)

Type of change

(Check the ones that apply by placing an "x" instead of the space in the [ ] so it becomes [x])

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

(Describe any issues that remain or work that should still be done.)

@huss
Copy link
Copy Markdown
Member

huss commented Apr 4, 2026

@Andrew-Bonner Thank you for working on this. This work came a month after PR #1581 to update all routes to use the new HTTP_CODE (whose name is likely changing). Given this, I think you need to merge in that work and modify your code to be consistent. It seems likely to create merge conflicts and inconsistent code and since this is the newer PR it should be the one to adjust. Unfortunately, it isn't quite done in terms of changing the location/name of the http code const so it could be done now but would probably need updating once it is complete. I'm unsure if that would necessitate more changes at that point. Given this situation, I'm not going to review this PR until this situation is resolved. Please let me know if you want to discuss this or have thoughts.

@Andrew-Bonner Andrew-Bonner marked this pull request as draft April 20, 2026 22:09
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.

HTTP Status Code Audit and Standardization

2 participants