Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Inhalt



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

{
  "status": "CREATED",
  "message": "Successfully created entry",
  "id": 42
}


UPDATED

{
  "status": "CREATED",
  "message": "Successfully created entry",
  "id": 42
}

  • No labels