Membrane API Gateway returns 500 Internal Server Error with the detail Error validating message when the JSON Schema validator throws an unexpected exception while it validates a request or response. This is not a validation failure, and it usually indicates a bug in Membrane.
The response contains the status 500 Internal Server Error, the detail Error validating message, the problem type https://membrane-api.io/problems/internal and a link to this page. The internal validator field names the validator. The type internal means that the gateway could not complete the processing of the message. In production mode, the title is replaced by Internal Server Error and the details are left out.
The URL of this page names the JSON Schema validator, which is a validator with a jsonSchema:
api:
port: 2000
flow:
- validator:
jsonSchema: order.schema.json
target:
url: https://api.predic8.de
api:
port: 2000
flow:
- validator:
jsonSchema: order.schema.json
target:
url: https://api.predic8.de
A message that does not match its schema is rejected with a validation error that lists the violations, and a body that cannot be read is reported as a body read error. Neither leads to this page.
An exception occurred inside the validation code or in the JSON Schema library, and the validator does not handle it. No concrete trigger is known, so treat this error as a bug in Membrane or in the library.
error level.By default, Membrane runs in development mode and adds details to error responses that help you find the problem. These details may reveal information about your setup. In production, turn them off:
configuration:
production: trueconfiguration: production: true
Add the configuration document to your apis.yaml and separate it from the APIs with ---. The title then reads Internal Server Error, and the details and the link to this page are left out. If the response contains a log key, search the gateway log for it to find the full error message.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.