API Endpoint to Collect Client Errors
Let’s say you have a (Client) Frontend (e.g. Angular) over a Dotkernel API and there may be cases when there are errors, eighter the API changed it’s response(s) over night or just a simple variable being undefined
for some reason.
Since in our case Frontend is running on user client there is so little to do but we’ve come with an ideea for “writing down” any inconveniences.
We have created an endpoint where Clients can submit the error message when things are going down hill.
A simple POST to your Dotkernel API on route: https://api.dotkernel.net/error-report
With body:
{
"message": "My awesome error!!!"
}
Note: The error message will be stored by default in /log/error-report-endpoint-log.log
, a separate log for Client and the message will be saved with a timestamp.
Looking for PHP, Laminas or Mezzio Support?
As part of the Laminas Commercial Vendor Program, Apidemia offers expert technical support and services for:
Leave a Reply