Patch/authentication exception
What I did
- Changed 'Token not found' to throw a standard
\Exception
rather than aDF_REST_Exception
, as "Token Not Found" is not a message that should make its way out to the user.
Implications
Laravel-side API calls that strike this circumstance now get a 500 response with {message: "Server Error"}
.
Setup
None
How to test
- Code review.
- Test with Art Money projects; create the situation by e.g. a code change to force this to happen.
- Confirm that the response to the Laravel-side call no longer uses the format for error messages intended for the user, i.e.
{
result: "error"
errors: ["Token Not Found"]
}