From 218f91dce2b1ce930165e21e8a461f8eed495c18 Mon Sep 17 00:00:00 2001 From: justtemmie Date: Tue, 29 Apr 2025 21:53:17 +0200 Subject: [PATCH] chore: add status 500 errors to every endpoint --- API/client-server/v1/friend-request.md | 3 ++- API/client-server/v1/login.md | 1 + API/client-server/v1/register.md | 1 + API/client-server/v1/stats.md | 5 +++-- API/client-server/v1/support.md | 1 + API/client-server/versions.md | 11 ++++++----- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/API/client-server/v1/friend-request.md b/API/client-server/v1/friend-request.md index 0d131a5..8d22e1a 100644 --- a/API/client-server/v1/friend-request.md +++ b/API/client-server/v1/friend-request.md @@ -33,4 +33,5 @@ Sends a friend request to the given user. Friend requests can be accepted by hav | 200 | Friend request sucessfully sent. | | 400 | The post request included poorly formated data. | | 401 | The recipient is not accepting friend requests from the sender at the moment. | -| 403 | Invalid access token. | \ No newline at end of file +| 403 | Invalid access token. | +| 500 | An unhandled error occured. | \ No newline at end of file diff --git a/API/client-server/v1/login.md b/API/client-server/v1/login.md index 3502e80..b4d8c17 100644 --- a/API/client-server/v1/login.md +++ b/API/client-server/v1/login.md @@ -32,6 +32,7 @@ Authenticates the user, and issues an access token for future requests. | 200 | Authentication successful. | | 400 | The post request included poorly formated data. | | 403 | Part of the cridentials are invalid. | +| 500 | An unhandled error occured. | --- diff --git a/API/client-server/v1/register.md b/API/client-server/v1/register.md index 6a302ec..2b88b0f 100644 --- a/API/client-server/v1/register.md +++ b/API/client-server/v1/register.md @@ -33,6 +33,7 @@ Registers the user, and issues an access token for future requests. | 200 | Registration successful. | | 400 | The post request included poorly formated data. | | 403 | Signups are disabled, gorb ID not available, email already in use, or password doesn't meet the minimum security requirements. | +| 500 | An unhandled error occured. | --- diff --git a/API/client-server/v1/stats.md b/API/client-server/v1/stats.md index dbd9ad1..4c8c379 100644 --- a/API/client-server/v1/stats.md +++ b/API/client-server/v1/stats.md @@ -11,13 +11,14 @@ No request parameters or request body. ## Responses | Status | Description | -| ------ | -------------------------------- | +|--------|----------------------------------| | 200 | The current stats of the server. | +| 500 | An unhandled error occured. | ### 200 response | Name | Type | Description | -| ------------ | ------ | ------------------------------------------------------------------------------------------- | +|--------------|--------|---------------------------------------------------------------------------------------------| | accounts | int | The number of signed up accounts. | | uptime | int | How many seconds the server has been running. | | version | string | The current server version. | diff --git a/API/client-server/v1/support.md b/API/client-server/v1/support.md index 0f932aa..c8c2ad6 100644 --- a/API/client-server/v1/support.md +++ b/API/client-server/v1/support.md @@ -14,6 +14,7 @@ No request parameters or request body. |--------|-------------------------------------------------| | 200 | Support information for the server. | | 404 | No contact information has been made available. | +| 500 | An unhandled error occured. | ### 200 response diff --git a/API/client-server/versions.md b/API/client-server/versions.md index 3f056c9..8cf4190 100644 --- a/API/client-server/versions.md +++ b/API/client-server/versions.md @@ -11,15 +11,16 @@ No request parameters or request body. ## Responses | Status | Description | -| ------ | ------------------------------------- | +|--------|---------------------------------------| | 200 | The versions supported by the server. | +| 500 | An unhandled error occured. | ### 200 response -| Name | Type | Description | -| -------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------- | -| unstable_features | dict[string:bool] | Unstable features that are supported by the server. Features not listed here indicate that a feature isn't supported. | -| versions | list[string] | **Required**: The supported protocol versions. | +| Name | Type | Description | +|-------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------| +| unstable_features | dict[string:bool] | Unstable features that are supported by the server. Features not listed here indicate that a feature isn't supported. | +| versions | list[string] | **Required**: The supported protocol versions. | ```json {