New updates and improvements to Lago.

Error management

We have refactored the error management system to give more visibility to API users.

The <text-code>message<text-code> attribute for errors has been replaced with <text-code>code<text-code> and <text-code>error_details<text-code>, which provide more information about the errors. There are several codes associated with each error.

For example, when creating a new billable metric, the API may return <text-code>"error": "Unprocessable entity"<text-code> with the code <text-code>value_is_mandatory<text-code> for the <text-code>name<text-code> field (i.e. the name of the billable metric is missing).

Please refer to the documentation available for each endpoint for more information on error codes.