Membrane API Gateway returns 500 Internal Server Error with this page when it fails to run the response handling of the internal APIs a request had passed through via internal:// targets. This is rare and usually indicates a bug in Membrane or an unexpected internal state.
The response contains the status 500 Internal Server Error, the problem type https://membrane-api.io/problems/internal and a link to this page. The error occurs in the response flow. The type internal means that the gateway could not complete the processing of the response. In production mode, the title is replaced by Internal Server Error and the details are left out.
When a request is forwarded to another API with an internal:// target, Membrane remembers the plugins of that internal API. When the response comes back, it runs their response handling. Exceptions in those plugins are normally caught and reported under the plugin's own URL. This page is only used when running the response handling itself fails. No concrete trigger is known, so the causes below are described in general terms.
Membrane keeps the internal API's plugins for the way back in the exchange property membrane.routing.back.interceptors. If a script or plugin overwrites this property with a value that is not a list, the response handling fails.
Another unexpected exception in the internal route's response handling. It is logged as Could not invoke response handler for internal route. with the stack trace.
membrane.routing.back.interceptors.For routing problems on the way in, see internal/internal-routing/request.
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 response then only contains a log key. Search the gateway log for this key to find the exception.
Configuration reference:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.