Best practice

Readable Error Messages

Error messages are the only piece of documentation you can be sure people will read when it is relevant. Write them accordingly.
Beth Andres-Beck

Use RFC 7807 "Problem Detail" to document API errors.