API responses
Inhalt
- 1 Error
- 1.1 Valid status-codes
- 1.2 Examples
- 2 Successful operation
- 2.1 Valid status-codes
- 2.2 Examples
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
{
"status": "ERROR",
"errorcode": "VALIDATION_ERROR",
"message": "One or more fields are missing or invalid"
}
DB_ERROR
{
"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
{
"status": "DELETED",
"message": "Successfully deleted entry"
}
CREATED
UPDATED
Â