500 Internal Server Error

Scenario: A server-side error occurs in NAV while processing a request, such as attempting to create a record with invalid data.
Error Message: Server returned a HTTP error code (not 200 OK): 500 Internal Server Error.
Cause:

  1. Invalid data in the request payload (e.g., malformed email address).
  2. Unhandled exception in NAV code.

Resolution:

  1. Review the NAV Logs:
    • Check the Event Viewer or Debug logs on the NAV server for detailed error information.
  2. Validate Data:
    • Ensure all input data conforms to NAV’s validation rules.
  3. Test with Minimal Payload:
    • Filter on a single record to isolate the root cause.