I want to differentiate between separate types of "Not Found" errors. For Example given the following request:
GET /author/Adams/works/HHGTTG
Either the author could be 'not found' or the work could be'not found' and I want to differentiate between the two.
status: 404 - author not found
status: 404 - work not found
According to the spec the reason phrase can be changed. http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html
6.1.1 Status Code and Reason Phrase
...The reason phrases listed here are only recommendations -- they MAY be replaced by local equivalents without affecting the protocol...
Is it also acceptable to use two unique phrases for the same status code?
And, is this a sound approach or is there a better convention for indicating more granular errors?
Ultimately I want to have a client library that could throw either an AuthorNotFound or WorkNotFound exception instead of a generic AuthorOrWorkNotFound exception.