dojo.xhr Response Message Status Code Text

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dojo.xhr Response Message Status Code Text

Greg Walters
Hi,

I am doing a dojo.xhr command. I get back the error object as expected. I can see the

status = 500
name = RequestError
data = ""
text = "stuff from the server"

What I would like to get is the text for the 500 error code. In Fiddler I see 'Server Error' on the response

HTTP/1.1 500 Server Error

How do I get that text 'Server Error'. Is it in a header? It does not seem to appear anywhere in the returned object. Any help would be appreciated.

Thanks,
Greg
Reply | Threaded
Open this post in threaded view
|

Re: dojo.xhr Response Message Status Code Text

Simon Walter
HTTP response code #500 literally means server error. See
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

On 2016/03/03 9:57, Greg Walters wrote:

> Hi,
>
> I am doing a dojo.xhr command. I get back the error object as expected. I
> can see the
>
> status = 500
> name = RequestError
> data = ""
> text = "stuff from the server"
>
> What I would like to get is the text for the 500 error code. In Fiddler I
> see 'Server Error' on the response
>
> HTTP/1.1 500 Server Error
>
> How do I get that text 'Server Error'. Is it in a header? It does not seem
> to appear anywhere in the returned object. Any help would be appreciated.
>
> Thanks,
> Greg
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojo-xhr-Response-Message-Status-Code-Text-tp4006733.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: dojo.xhr Response Message Status Code Text

Greg Walters
Hi Simon,

Yes, I agree. That is what it means. I told my client that. I also tried to explain that the words 'Server Error' are not part of the message. Where do those words come from? He is emphatic that I can get that text and display it. I argue that he should send me text with the message and I will display that. He wrote the server for my application.

Do tools like Fiddler, Wire Shark and others generate text from the 500 status code?

I have seen dojo examples where text is displayed, but it is generated from the status code. So I don't feel the text is available, or it must be generated.

Thoughts?

Thanks,
Greg