Known Error Codes

In order to allow clients to reliably detect individual error causes, LoopBacksets the error code property to a machine-readable string.

Error codeDescription
ENTITY_NOT_FOUNDThe entity (model) was not found. This error is returned for example by EntityCrudRepository.prototype.findById
VALIDATION_FAILEDThe data provided by the client is not a valid entity.
INVALID_PARAMETER_VALUEThe value provided for a parameter of a REST endpoint is not valid. For example, a string value was provided for a numeric parameter.
MISSING_REQUIRED_PARAMETERNo value was provided for a required parameter.

Besides LoopBack-specific error codes, your application can encounter low-levelerror codes from Node.js and the underlying operating system. For example, whena connector is not able to reach the database, an error with code ECONNREFUSEDis returned.

See the following resources for a list of low-level error codes: