Replies: 1 comment 1 reply
-
Changing error variant is a breaking change, but it's worth considering. However I am not sure whether we can actually distinguish between Can you do some investigation on MySQL and Postgres to demonstrate the logic? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think when you try to call
update
on anActiveModel
that does not exist, it should return aRecordNotFound
instead ofRecordNotUpdated
.This makes it possible to try to update without knowing the record exists, when
update
returnsRecordNotUpdated
you don't really know that the record is missing or there is some other issue with update. This is specially helpful on rest apis when you receive the response and you know that you should return a 500 error or a 404 with a single database query.If you agree I can make a PR
Beta Was this translation helpful? Give feedback.
All reactions