Subject: [weirds] Error handling in draft-newton-et-al-weirds-rir-query ?

From: Ray Bellis <[email-masked]>
Date: Wed, 16 Nov 2011 01:34:09 +0000

Just wondering, as I don't see it in the doc, and am not familiar with the preferred semantics in "RESTlike" applications -

What's the expected response in case of errors?

For example, if the query is for a non-existent entity, would the server:

a)  return a "200 OK" with some form of error returned in
    the response body in the appropriate data format, i.e.:

    {"error": "no such domain"}
 
  or,

b)  return a "404 Not Found" error with an unspecified response body

Ray

---

From: Byron Ellacott <[email-masked]>
Date: Wed, 16 Nov 2011 11:48:19 +1000

> b)  return a "404 Not Found" error with an unspecified response body

My preference is:

c) Return a 404 error with detail in the response body.

Or whatever the appropriate 4xx error is for the mistake made by the client.

  Byron

---

From: Ray Bellis <[email-masked]>
Date: Wed, 16 Nov 2011 02:05:34 +0000

> c) Return a 404 error with detail in the response body.

Which kind of implies having the schema(s) include definitions for status messages.

Hmm...

Ray

---

From: Byron Ellacott <[email-masked]>
Date: Wed, 16 Nov 2011 12:28:38 +1000

> Which kind of implies having the schema(s) include definitions for status messages.

Yes, it does, as well as a dictionary of expected return codes per request.

  Byron