Skip to content

Fix issue causing null pointer exception when required field missing from requestBody #48

@DSchrupert

Description

@DSchrupert

When a request is sent to an endpoint where the requestBody is defined without a required field, the following exception is thrown:

17:54:59.003 [XNIO-1 task-3]    ERROR c.n.exception.ExceptionHandler handleRequest - Exception:
java.lang.NullPointerException: null
	at com.networknt.openapi.RequestValidator.validateRequestBody(RequestValidator.java:96)
	at com.networknt.openapi.RequestValidator.validateRequest(RequestValidator.java:79)
	at com.networknt.openapi.ValidatorHandler.handleRequest(ValidatorHandler.java:73)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions