Reputation: 138071
I noticed that ColdFusion (version 8 at least) returns the HTTP status code 500
(internal server error) when an uncaught exception occurs in a CFML page. Is this kind of behavior abusing the HTTP status codes, or is it, on the opposite, a nice behavior I should try to reproduce for my other, non-ColdFusion app?
Upvotes: 1
Views: 94
Reputation: 4916
No it's not abusing, it's a really nice thing to do. AJAX errors are also reported in the status code, description in the body.
Upvotes: 1
Reputation: 5488
This is a nice behavior. Especially if you are creating services. Applications consuming your end points can simply check the HTTP status to know if there is an error. Typically, you may also include some text about the error in the body.
Upvotes: 1