fix(HMS-2757): improve unexpected row error #706
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An error striked me this morning: "failed to save AWS pubkey name to DB: expected 1 row: unexpected affected rows" which means detail reservation could not be updated after AWS key was updated. It looks like we fetch AWS reservation detail from the database but we do not load
reservation_id
field which is okay unless we need to update such record. This field is used in the WHERE query to locate the correct record.I am adding few more log statements to see little bit more and adding the missing field.
During this, I noticed that our reservation - detail association is set up in a way that one reservation can have multiple details for different providers. But we have never done that, our current implementation is 1:1, we might drop this in the future. But it is okay for now.