You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We intend for resources to be pre-checked via `verify_scoped_resource`.
However, there are still race conditions which can causes resources to
not be found after the check. We do not yet have a mechanism for
defining custom scoping for a resource. So some controllers may perform
their own custom scoping which can raise a not found error.
To handle this we insert our own `rescue_from` clause into all JSON api
controllers. This allows us to parse the message and convert it into our
standard `ResourceNotFound` error. Our naming convention for resources
is underscore names and to be plural. Since AR just puts the model name
in the message we need to do the conversion here before creating our
custom error.
0 commit comments