Question

Show custom error message in case of 400 error code

  • 21 March 2022
  • 3 replies
  • 77 views

Hello,
I'm trying to display a custom error message to the user when a service call returns a 400 error.


Indeed, our services return a 400 error code with a specific message.
Example:

{"errors":{"":["There should have only one occurrence of each language: fr 2 occurrences","There should have only one default language in Contents"]},"type":"https:/ /tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"00-367e5cbb1a26ddb093fc31b10d23115c-53881c67df805217-00 "}

 

In case of error, the user sees only the title content. (only Admin can see the entire content result on the monitoring interface)
How can i do to show him the errors content?

 

Thanks a lot for your answer.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +12

Hi @sociabble_dev!

 

Can I ask - are you creating your own Zapier app integration (using the developer Platform). or are you using a Webhooks by Zapier step in your Zap? If you’re using developing your own integration, then the best place to ask your question is in the Developer Discussion category

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hello Danvers,

 

I’am using the developer platforms with CLI.

 

I have succeeded to solve my problem using the code 
response.skipThrowForStatus = true; and handling the error.

It’s ok for me.

Thanks a lot for your response and sorry for my wrong place to write my demand :(

 

Best Regards

Xavier Tessier

Userlevel 7
Badge +9

Thanks so much for sharing your solution with the Community, @sociabble_dev! So glad to hear you were able to get this sorted. 🤗