Skip to main content
Version: 4.x

EXP2001: Request body was not parsed

Printed as a development warning, once, outside production. EXPRESSOTS_DEV_WARNINGS=off silences it.

A handler asked for the request body with @body(), the request carried one, and the handler received undefined, because no body parser handled the request.

Fix​

Call the parser in configureServices():

async configureServices(): Promise<void> {
this.Middleware.parse();
}

parse() handles JSON and URL-encoded bodies. For another content type, add a parser for it.

All codes are listed under Error responses.