Search code examples
loopbackjstranslateloopback

Translate default error messages in Loopback


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: "my@email.com").

Solution

  • 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