Where do I override REST error messages?


I’m working on a REST API and I’m trying to customize the error response. By default, if I use the wrong credentials when submitting a request I see this:


  "name": "Unauthorized",

  "message": "You are requesting with an invalid credential.",

  "code": 0,

  "status": 401


Where and how can I remove the "code" and "name" lines?


Hi Littlebob!

You can change your response using the event “before send”. I’m sending you a link describing how it works (Customizing Error Response Format).


Best regards,


Thank you.