Top Description Fields Constructors Methods
org.springframework.web.server

public Class ServerWebInputException

extends ResponseStatusException
Class Inheritance
Known Direct Subclasses
org.springframework.web.server.UnsatisfiedRequestParameterException, org.springframework.web.bind.support.WebExchangeBindException, org.springframework.web.server.MissingRequestValueException
Annotations
@SuppressWarnings:serial
Imports
org.springframework.core.MethodParameter, org.springframework.http.HttpStatus, org.springframework.lang.Nullable

Exception for errors that fit response status 400 (bad request) for use in Spring Web applications. The exception provides additional fields (e.g. an optional MethodParameter if related to the error).
Author
Rossen Stoyanchev
Since
5.0

Field Summary

Modifier and TypeField and Description
private final MethodParameter

Constructor Summary

AccessConstructor and Description
public
ServerWebInputException(String reason)

Constructor with an explanation only.

public
ServerWebInputException(String reason, MethodParameter parameter)

Constructor for a 400 error linked to a specific MethodParameter.

public
ServerWebInputException(String reason, MethodParameter parameter, Throwable cause)

Constructor for a 400 error with a root cause.

protected
ServerWebInputException(String reason, MethodParameter parameter, Throwable cause, String messageDetailCode, Object[] messageDetailArguments)

Constructor with a message code and arguments for resolving the error "detail" via org.springframework.context.MessageSource.

Method Summary

Modifier and TypeMethod and Description
public MethodParameter
getMethodParameter()

Return the MethodParameter associated with this error, if any.

Inherited from org.springframework.web.server.ResponseStatusException:
getHeadersgetMessagegetReasongetResponseHeadersupdateAndGetBody

Field Detail

parameterback to summary
private final MethodParameter parameter
Annotations
@Nullable

Constructor Detail

ServerWebInputExceptionback to summary
public ServerWebInputException(String reason)

Constructor with an explanation only.

ServerWebInputExceptionback to summary
public ServerWebInputException(String reason, MethodParameter parameter)

Constructor for a 400 error linked to a specific MethodParameter.

ServerWebInputExceptionback to summary
public ServerWebInputException(String reason, MethodParameter parameter, Throwable cause)

Constructor for a 400 error with a root cause.

ServerWebInputExceptionback to summary
protected ServerWebInputException(String reason, MethodParameter parameter, Throwable cause, String messageDetailCode, Object[] messageDetailArguments)

Constructor with a message code and arguments for resolving the error "detail" via org.springframework.context.MessageSource.

Since
6.0

Method Detail

getMethodParameterback to summary
public MethodParameter getMethodParameter()

Return the MethodParameter associated with this error, if any.

Annotations
@Nullable