Skip to main content

Sending back status other then 200

  • November 19, 2020
  • 3 replies
  • 1536 views

basdebruin

I did some debugging because of an issue and found out that if my backend (using an integration) is sending 401 or 403 status back to a request from a custom action, the request is send again and again. Is this expected behavior?

This topic has been closed for replies.

3 replies

dsilva
Forum|alt.badge.img
  • Participating Frequently
  • November 23, 2020

Hey @basdebruin - let me check in with the team and see what/if the retry policy on this would be.

In the meanwhile could you shed some light on what the scenario would be when the integration returns a 401 or 403 status back?

-Daniel


basdebruin
  • Author
  • Community Expert
  • November 23, 2020

hi @dsilva

I discovered (and that is confirmed by @AlexSavchuk) that when receiving a request from a custom action responding with anything other than 200 status will result in numerous retries from your side. Does not matter if I throw a 401 or a 403. Alex confirmed this and is discussing this with development. I asked Alex to implement also 402 (Payment required) in such a way that the user gets the famous red error bar with either a default text “Payment required, please contact your vendor” or the JSON error text supplied. So, when I send:

res.status(402).json({ error: "Payment required, please visit excellent-team.nl" }

the text “Payment required, please visit excellent-team.nl” would popup in the error bar on top of the page. Implementing this will give far better control and less calls / mails / posts with questions and concerns form our customers (both to monday.com and to the app developers).

Today I also reached out to Alex what happens when I respond with e.g. 405 (Method not Allowed) during the (un)subscribe request from a custom trigger. Will that also lead to multiple retries or will you just “shut up” 🙂. During the subscribe event of a custom trigger the backend might conclude that the give combination of fields in the recipe is not acceptable. In that case I do send a in-system notification and currently respond with a 200. A 405 would be much better.

Many thanks for reaching out to development on this matter.


basdebruin
  • Author
  • Community Expert
  • March 5, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.