The general pattern everywhere else is to keep the error messages to static text of what happened and put details in a structured object attached to the error. When you can easily inspect an error this works well. When you just see a simple log message, it may not have any of the details and cause confusion.
Should more messages have inline details? Should none have them? How do you pick which details? Should the details be stringified as JSON in the message?
An update changed one error to include data in the error message: https://github.com/digitalbazaar/jsonld.js/pull/421
The general pattern everywhere else is to keep the error messages to static text of what happened and put details in a structured object attached to the error. When you can easily inspect an error this works well. When you just see a simple log message, it may not have any of the details and cause confusion.
Should more messages have inline details? Should none have them? How do you pick which details? Should the details be stringified as JSON in the message?