Request Error Event Multiple Messages

414
1
12-13-2017 12:11 PM
Labels (1)
PatrickMcKinney1
Occasional Contributor III

I've been messing around with the requesterror event.  I have a CodePen where I'm testing stuff.  If you change the URL for either service to the "bad" URL, there are multiple error messages.  

 

Is there a way to use a conditional statement or other method to only display the message once? For example, just using the straight service URL, as opposed to "/query" or "/exportto"? 

 

I know I could add a generic message, but I would like to add the service URL in the message.

0 Kudos
1 Reply
JohnGravois
Frequent Contributor

the error is definitely going to fire the event every time, but you could add some logic in your handler to strip operations like `/export` and `/query` from the url and compare it to what you've already displayed and only selectively bubble up a warning to users.

0 Kudos