Below are some examples of common errors that you might encounter when using webhooks. If you are unable to resolve your issue, you can always reach out to our Support Team and provide them with a resource SID so that they can locate the call/message record and offer assistance.
HTML Retrieval Errors happen when there is a failure to retrieve the contents of the URL in your webhook. This indicates that SignalWire tried to reach your URL but did not receive a response before the connection timed out. Our current timeouts are 2 seconds for Connect and 5 seconds for Read, and we retry twice once the connection times out.
SignalWire automatically retries HTTP retrieval requests. If it’s an action type of webhook, SignalWire won’t attempt a retry but will go to the fallback URL (on inbound calls, can specify an action URL and a fallback URL). If it’s a status callback webhook, SignalWire will retry three times, and back off slightly between each attempt. So the second one will retry very quickly, and for the third retry, the system will wait a few seconds.
If you only experienced this error temporarily only to see the same webhook work successfully later, your web server was likely temporarily unavailable or experiencing a network outage. If this issue is persisting, we recommend taking a look at your systems to verify there are no processes or queries taking too long to return.
The SignalWire Compatibility APIs and SignalWire Compatibility XML both require all documents to be properly formatted as XML in order for SignalWire to be able to read and parse them. If you receive a document parse error, something in your code is preventing SignalWire from parsing the XML document.
If you are using the Compatibility API in any of our available SDKs, make sure that your code is returning proper XML. You can convert response to XML or for an easier method, convert response to string. For example, this is the Python SDK returning response as a string:
This results in proper XML:
You can also check the following:
<Response>This error occurs when SignalWire couldn’t connect to the server the way it was intended/asked to. In most cases, the correct way to fix this is to switch to whichever protocol you did not originally use. Usually, this happens when you need to use HTTPS, but you used HTTP. However, it can happen the other way around as well. Double-check to make sure that you have spelled the protocol correctly and that the protocol you entered is supported.
This error can occur when the request has been redirected too many times in a row and has been flagged for potentially being in a loop. SignalWire accepts and will follow up to 3 redirects for a webhook before throwing this error. If you get this error, double-check the logs and your code to make sure you have not forgotten to create a stop condition preventing an infinite loop.
If you see a 502 Bad Gateway error, this may mean that SignalWire’s internal server had trouble retrieving content from the website or was unable to access it. The request must contain a valid Content-Type. SignalWire may also have had problems resolving the DNS name to an IP address or issues with the network connection.
https://www.signalwire.comThis error indicates that the response body to SignalWire’s request is larger than 64 kB. This can be caused if the XML that you are serving is larger than 64 kB or if you are serving non-XML content in your response (e.g. error message output).
<?xml version="1.0" encoding="UTF-8"?>.200 response in a status callback, use an empty XML response <Response/>