Translate default error messages in Loopback

318 Views Asked by At

My question is pretty simple, which is the best way to translate the default messages in loopback?

Example:

The `user` instance is not valid. Details: `email` Email already exists (value: "[email protected]").
1

There are 1 best solutions below

0
On BEST ANSWER

The response to the question is: you can't.

Loopback give us some codes, about the error, and we have to handle and translate it on the front.

this link describes the errors in LB:

https://loopback.io/doc/en/lb2/Error-object.html