Consistency between data for hook-repose vs hook-error

I’ve successfully set up my web hooks on the Device Cloud and I am able so publish and subscribe to these hooks accordingly. However, I do realise that I get back from a “hook-response” and a “hook-error” is completely different in terms of the fields. For example:

  • hook-reposes always gives me the the message returned by the host web page
  • hook-errors always gives the error message returned by particle cloud (e.g. error status 400 from demo.plugz.io). The status is great to have but the message returned by the host webpage also gives specific information about this error since multiple things can cause a 400 response. I want to handle each error appropriately.

For debugging and parsing purposes, I think these information is really important. I feel currently feel crippled by what little the webhook’s data/event handlers return. Any suggestions here?

Hook-Error:

Hook-Response:

Related Topic: How to get HTTP status codes from webhooks on the device

I do remember a discussion down that line a while back.
A customizable error resonse template would help out here

Would be worth revisiting @Dave’s thought from back then :wink: