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
Hey dude, great package. Would love to customize the error code when doing:
responder()->error('email_taken', 'The email is already taken')->respond();
so it doesn't always return error=500 by default. Also, not ideal to create an exception.
{"status":500,"success":false,"error":{"code":"email_taken","message":"The email is already taken"}}
Surely there is a simpler way. Any tips?
The text was updated successfully, but these errors were encountered:
aligajani
changed the title
How do I customize error code in when using responder()->error()->respond?
How do I customize error code when using responder()->error()->respond?
Jan 16, 2020
Hey dude, great package. Would love to customize the error code when doing:
responder()->error('email_taken', 'The email is already taken')->respond();
so it doesn't always return error=500 by default. Also, not ideal to create an exception.
Surely there is a simpler way. Any tips?
The text was updated successfully, but these errors were encountered: