Inhalt
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Error
Valid status-codes
Code | Description |
---|---|
VALIDATION_ERROR | One or more required fields are missing One or more fields are not valid |
NOT_EXISTING | The object doesn't exist |
EXISTING | The object already exists |
DB_ERROR | There was an error during the database operation |
Examples
Base
Code Block | ||
---|---|---|
| ||
{ "status": "ERROR", "errorcode": "VALIDATION_ERROR", "message": "One or more fields are missing or invalid" } |
DB_ERROR
Code Block | ||
---|---|---|
| ||
{ "status": "ERROR", "errorcode": "DB_ERROR", "error": "This is the DB_ERROR object from Prisma", "message": "There was an error during the database operation. More information in error" } |
Successful operation
Valid status-codes
Code | Description |
---|---|
CREATED | |
UPDATED | |
DELETED |
Examples
Base
Code Block | ||
---|---|---|
| ||
{ "status": "DELETED", "message": "Successfully deleted entry" } |
CREATED
Code Block | ||
---|---|---|
| ||
{ "status": "CREATED", "message": "Successfully created entry", "id": 42 } |
UPDATED
Code Block | ||
---|---|---|
| ||
{ "status": "CREATED", "message": "Successfully created entry", "id": 42 } |