Open Source API Gateway

500 Internal Server Error: HTTP/2 Request Without Response

Membrane API Gateway returns 500 Internal Server Error with this page when the processing of an HTTP/2 request ends without a response, because the plugin chain produced none or an exception escaped Membrane's flow control.

The Error Response

The response contains the status 500 Internal Server Error, the problem type https://membrane-api.io/problems/internal and a link to this page. In development mode it also contains the exception message, e.g. No response was generated by the interceptor chain. The type internal means that the gateway could not complete the processing of the request. In production mode, the title is replaced by Internal Server Error and the details are left out.

This is the HTTP/2 counterpart of internal/http-handler/no-response-produced and internal/http-handler/error-during-request-phase, which cover HTTP/1.x requests.

Common Causes

A Script Returned Without a Response

A groovy or javascript script, or a custom Java plugin, returned RETURN or ABORT without setting a response, or removed it. The message is then No response was generated by the interceptor chain.

An Internal API or a Statistics Request Aborted

A plugin inside an API reached through an internal:// target threw an exception, or a statisticsProvider request lacked numeric offset and max parameters. Both abort without a response.

An Error in Membrane's Flow Control

An exception occurred in Membrane's flow control itself, e.g. while it built the error response for another failure. This is rare and usually indicates a bug in Membrane.

How to Fix It

  1. Operator: in scripts, set a response before returning Outcome.RETURN or Outcome.ABORT, or return a Response object. See scripting with Groovy, JavaScript and SpEL.
  2. Client: call statisticsProvider with numeric offset and max parameters.
  3. Otherwise, enable development mode, or in production look up the log key of the response in the gateway log, and report the stack trace on GitHub Issues.

Hide Details in Production

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: true
configuration:
  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.

Related Documentation

Configuration reference:

← All Membrane error messages

Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.