Membrane API Gateway returns 500 Internal Server Error with a link to this page when the template plugin fails with an exception that is neither a Groovy error nor a failing template expression. This is rare.
The response contains the status 500 Internal Server Error, the title Internal server error., the problem type https://membrane-api.io/problems/internal and a link to this page. In development mode, the exception message is included as well. The type internal means that the gateway could not complete the processing of the exchange. The plugin can fail in the request or the response flow. In both cases the client receives 500. In production mode, the title is replaced by Internal Server Error and the details are left out.
The template plugin renders a Groovy template from src or location into the message body. Groovy errors and failing expressions have their own pages: Groovy error during template rendering and template expression failed. All other exceptions are reported with this page.
An XML template, whose location ends in .xml, failed with an exception that is not a Groovy error.
An exception occurred while Membrane wrote the rendered body to the message.
contentType.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 instead of the details the response only contains a log key. Search the gateway log for this key to find the exception.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.