summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-11 22:57:56 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-11 22:57:56 -0400
commit756863f298f9e4277863f9e8758e253c5ae95923 (patch)
tree82a9c6643b360b035f4630f2b1db138d9937c8d8 /docs
parent812f1cafe3f8a68bf45b677fade7417c30d92eac (diff)
Return a distinct error when an invite username is in use.
I've also aligned channel creation with this (it's 409 Conflict). To make server setup more distinct, it now returns 503 Service Unavailable if setup has not been completed.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/api.md b/docs/api.md
index f91780e..d544689 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -10,7 +10,7 @@ Requests that require a JSON body must include a `content-type: application/json
## Initial setup
-The `hi` service requires setup before it can enter service. This setup is performed online, via the `hi` API. Any request to an API endpoint before setup has been completed will return a 409 Conflict response, unless the endpoint is documented as allowing requests before setup.
+The `hi` service requires setup before it can enter service. This setup is performed online, via the `hi` API. Any request to an API endpoint before setup has been completed will return a 503 Service Unavailable response, unless the endpoint is documented as allowing requests before setup.
### `POST /api/setup`
@@ -197,6 +197,10 @@ This endpoint returns a 204 No Content response on success, with a `Set-Cookie`
This endpoint returns a 404 Not Found response if the invite ID in the path does not exist, or has already been accepted.
+#### Name already used
+
+This endpoint returns a 409 Conflict response if the requested login name has already been taken. The invite can be re-accepted with a different name.
+
## Working with channels
Channels are the containers for conversations. The API supports listing channels, creating new channels, and send messages to an existing channel.
@@ -224,7 +228,7 @@ Creates a channel.
#### On duplicate channel name
-Channel names must be unique. If a channel with the same name already exists, this will return a 400 Bad Request error.
+Channel names must be unique. If a channel with the same name already exists, this will return a 409 Conflict error.
## Events