|
|
@@ -1,3 +1,56 @@
|
|
|
+### Global Errors
|
|
|
+
|
|
|
+#### Database Write Error
|
|
|
+
|
|
|
+**Description:** occurs when a write is attempted against the database and fails.
|
|
|
+
|
|
|
+**Status Code:** `500`
|
|
|
+
|
|
|
+**Response Body:**
|
|
|
+
|
|
|
+```js
|
|
|
+{
|
|
|
+ Code: 500,
|
|
|
+ Errors: []String{
|
|
|
+ "Could not write to database",
|
|
|
+ },
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+#### Database Write Error
|
|
|
+
|
|
|
+**Description:** occurs when a read is attempted against the database and fails.
|
|
|
+
|
|
|
+**Status Code:** `500`
|
|
|
+
|
|
|
+**Response Body:**
|
|
|
+
|
|
|
+```js
|
|
|
+{
|
|
|
+ Code: 500,
|
|
|
+ Errors: []String{
|
|
|
+ "Could not read from database",
|
|
|
+ },
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+#### Internal Server Error
|
|
|
+
|
|
|
+**Description:** occurs with a generic internal server error
|
|
|
+
|
|
|
+**Status Code:** `500`
|
|
|
+
|
|
|
+**Response Body:**
|
|
|
+
|
|
|
+```js
|
|
|
+{
|
|
|
+ Code: 500,
|
|
|
+ Errors: []String{
|
|
|
+ "Internal server error",
|
|
|
+ },
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
### `/api/users`
|
|
|
|
|
|
#### `GET /api/users/{id}`
|
|
|
@@ -6,7 +59,7 @@
|
|
|
|
|
|
**URL parameters:**
|
|
|
|
|
|
-- `id` -- the user's ID.
|
|
|
+- `id` The user's ID.
|
|
|
|
|
|
**Query parameters:** N/A
|
|
|
|
|
|
@@ -38,7 +91,7 @@ User{
|
|
|
|
|
|
**URL parameters:**
|
|
|
|
|
|
-- `id` -- the user's ID.
|
|
|
+- `id` The user's ID.
|
|
|
|
|
|
**Query parameters:** N/A
|
|
|
|