I think it would be fine to have different text there, probably better than 
having the standard text if you have refined detail. I don't think it'd be a 
good idea to conditionalize on the response text in client code - that's always 
fragile. If you want to give additional machine-readable detail, I'd put it in 
a response header or in the body as a JSON or XML field or what have you.

You can specify custom text there, but you may have to sidestep the usual 
response classes, depending on which one. The one you gave, not found, can have 
the message customized though, just do new NotFoundResponse("the message").

-Ross

On Feb 6, 2010, at 2:52 PM, Erkki Lindpere wrote:

> It seems Lift does not support custom HTTP Reason Phrases in
> responses. I would like to send error messages in the Reason Phrase
> (along with a vaguely applicable HTTP status code) in a RESTful API
> I'm providing. My understanding of the HTTP spec is that the reason
> phrase is meant to be human readable and does not have to contain the
> recommended messages (i.e. "Not Found").
> 
> But maybe it would not be wise to do this? I'm not actually aware of
> any API-s that send error messages in the Reason Phrase.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to