| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<catch> handler for each specific type of badfetch that returns a HTTP response code. As such, any 'error.badfetch' handler that has a specific HTTP response code suffix, (see RFC2616 for a listing of all response codes), can be handled appropriately. For instance:
<catch event="error.badfetch.http.404">
<log expr=" '*** CAUGHT AN ERROR.BADFETCH.404 ***' "/>
</catch>
<catch event="error.badfetch.http.500">
<log expr=" '*** CAUGHT AN ERROR.BADFETCH.500 ***' "/>
</catch>
<catch event="error.badfetch.http.505">
<log expr=" '*** CAUGHT AN ERROR.BADFETCH.505 ***' "/>
</catch>
<property> value, an undefined variable is referenced, or any number of standard run-time errors in the script. When this is encountered, you will likely need to comb over your code to the minute detail in order to find the culprit. Experienced coders will make liberal use of the <log> element in order to track variables and more easily narrow down what is at fault, and will also put in some heavy analysis of the Voxeo debugger output.| ANNOTATIONS: EXISTING POSTS |
alexey.timofeev
|
|
| Hi!
Could you please help me with catching the error.badfetch.http.503 (Service Unavailable) Is it possible? -- Thanks in advance, Natalia. |
|
VoxeoDustin
|
|
| Hey Natalia,
You can catch this error with a <catch> handler specifying one of these three formats, depending on how specific you wish to be: <catch event="error"> <catch event="error.badfetch"> <catch event="error.badfetch.http"> Regards, Dustin Hayre Customer Support Engineer II Voxeo Support |
|
alexey.timofeev
|
|
| Thanks,
I've tried all variants but actually failed. The exception is not caught. Error: VoiceException: error.badfetch.http.503 Failed fetch with code: 503 (Service Unavailable) <catch> seems not to work here. -- Regards, Natalia |
|
voxeoJeffK
|
|
| Hello Natalia,
We'd be glad to investigate the results you're seeing. There could be a couple causes of this: - The catch handler is out of scope. - The badfetch is for an <audio> file. There is no error thrown in this case as per the VXML spec. Do you have perhaps a representative sample of code that we could review for you? Regards, Jeff Kustermann Voxeo Support |
| login |
|