Subject: [Acme] Own error type for missing agreement

From: Richard Körber <[email-masked]>
Date: Tue, 22 Dec 2015 23:26:08 +0100

Hello!

There should be an own error type if the server requires the client to agree
to the (latest) Terms of Service.

Rationale: Currently, when an account needs to accept the Terms of Service,
the server responds with this error:

{"type":"urn:acme:error:unauthorized","detail":"Must agree to subscriber
agreement before any further actions","status":403}

The client is then supposed to present the agreement document to the user and
ask for confirmation.

However, a software could only detect this case by parsing the human readable
"detail" string, which will break if the error detail message should change.

There should be an own error type, e.g. "urn:acme:error:noagreement", so a
client is able to distinguish this special case from other "unauthorized"
cases. Unlike the other "unauthorized" errors, the requirement to accept the
Terms of Service is an error that the user is able to fix himself immediately,
just by updating his account.

Richard