Logging/Error Reporting

Prev Next

Tracing and Error Handling in the API

The API includes built-in tracing capabilities that allow you to monitor request and response data, as well as other relevant information from the API controllers, such as exceptions. As described in the Tracing chapter, tracing can be enabled or disabled through the configuration settings.

You can also configure the MinimumLevel for tracing to control which types of messages are logged. The available logging levels, in order of increasing severity, are:

  • Debug
  • Info
  • Warning
  • Error
  • Fatal

Communicating Errors

When reporting errors to API users, standard HTTP status codes should be used whenever possible:

  • 2xx codes indicate successful operations.
  • 4xx codes signal client-side errors, such as issues with the request.
  • 5xx codes represent server-side errors within the Safran Project Integration API.