BadRequestException

open class BadRequestException : Exception

Base exception to indicate that the request is not correct due to wrong/missing request parameters, body content or header values. Throwing this exception in a handler will lead to 400 Bad Request response unless a custom io.ktor.features.StatusPages handler registered.

Constructors

<init>

BadRequestException(
    message: String,
    cause: Throwable? = null)

Base exception to indicate that the request is not correct due to wrong/missing request parameters, body content or header values. Throwing this exception in a handler will lead to 400 Bad Request response unless a custom io.ktor.features.StatusPages handler registered.

Inheritors

MissingRequestParameterException

class MissingRequestParameterException : BadRequestException

This exception is thrown when a required parameter with name parameterName is missing

ParameterConversionException

class ParameterConversionException : BadRequestException

This exception is thrown when a required parameter with name parameterName couldn’t be converted to the type