Webhook result also based on HTTP status code #2240
randallrecobee
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@randallrecobee Thanks, I think that's a great idea. As you suggest, we need to find the minimal (and generic) mapping between HTTP and MQTT connect response codes. Also, for consistency, we obviously want to do this for Can you suggest your HTTP2MQTT mappings in a Markdown table here? We can then add the v5 mappings as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current form of
auth_on_register
webhook can return two things, for the most part: either the connecting client is allowed or rejected. These two translate to MQTT Return Code(RC) 0 or 5, respectively. This, however, does not reflect the current state of the service behind the webhook. For instance, the service may have been overloaded, restarted, or was undergoing maintenance. All of these would result in RC 5 which depending on the client could result in different behaviors.Would it be a good idea to take into consideration the HTTP response code of the webhook service. For example, any HTTP status code 5XX and 429 would result to RC 3(Connection Refused, Server unavailable).
Reference:
Beta Was this translation helpful? Give feedback.
All reactions