You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a text is sent to HA, there is only the response text returned in the logs of wirepod.
This makes it very difficult to figure out what is happening when that response is missing, such as when the access token is wrong (401), when the request is wrong (400) or another error happens. In both these cases there's no response text at all.
Would it be possible to return the HTTP response code when there is a non-200 status code? It would help immensely in debugging issues.
The text was updated successfully, but these errors were encountered:
**Note:** _Uncommenting AgentID stuff in the code is not required to use the default HA agent! It is an optional setting when you have multiple agents that are not the default agent in Home Assistant. Uncommenting these in the go code and not setting the AgentID properly may give you HTML status codes that you can't see and may not work. Test the default agent before using this._
Added this note, not sure about the second question, where are you seeing the html status code?
When you perform the HTTP request you will get a status code from the HA instance, or the proxy it connects to.
Currently you only report the response text in the log, but with a 4xx error there won't be one, so we can't know what happened to the request.
It would be nice to report the HTTP status code, as well as any possible response. So that in case of an error you can see in the logs that your request was faulty or any other status as well (like a 5xx error indicating that HA is having issues itself.)
See https://datatracker.ietf.org/doc/html/rfc7231#page-48 for the possible status codes. Note that we don't need all of these:
2xx codes indicate success, so you'd only need to add the code itself.
3xx codes should be transparent and probably won't need any special treatment either
only 4xx and 5xx codes indicate errors: 4xx means the request is invalid in some way, 5xx means the responding server has issues. Those are the important ones to know about.
When a text is sent to HA, there is only the response text returned in the logs of wirepod.
This makes it very difficult to figure out what is happening when that response is missing, such as when the access token is wrong (401), when the request is wrong (400) or another error happens. In both these cases there's no response text at all.
Would it be possible to return the HTTP response code when there is a non-200 status code? It would help immensely in debugging issues.
The text was updated successfully, but these errors were encountered: