Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulk meter reading error handling for duplicate date-pairs #4467

Merged
merged 11 commits into from
Jan 12, 2024

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Jan 8, 2024

Any background context you want to provide?

If two-meter readings have an identical combination of start_time and end_time a SQL error triggers a 500 error and the app hangs.

What's this PR do?

Prior to inserting meter readings into the db, the bulk meter reading request is checked for duplicate date-pairs. If duplicates are identified a 400 error is raised and the action is aborted.

How should this be manually tested?

see issue

What are the relevant tickets?

#4253

Screenshots (if appropriate)

Screenshot 2024-01-09 at 10 29 03 AM
Screenshot 2024-01-09 at 10 28 40 AM

Copy link

github-actions bot commented Jan 8, 2024

Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found:

@perryr16 perryr16 added the Bug label Jan 8, 2024
@perryr16 perryr16 marked this pull request as ready for review January 9, 2024 17:44
@perryr16 perryr16 changed the title 4253 bulk meter reading insert 500s Add bulk meter reading error handling for duplicate date-pairs Jan 9, 2024
Copy link
Member

@axelstudios axelstudios left a comment

Choose a reason for hiding this comment

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

Nice!

@axelstudios axelstudios merged commit 4a60eb2 into develop Jan 12, 2024
8 checks passed
@axelstudios axelstudios deleted the 4253-bulk-meter-reading-insert-500s branch January 12, 2024 18:24
@axelstudios axelstudios mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants