Chapter 12. Exception handler method parameter types supported in Quarkus


The Quarkus extension for Spring Web API supports the following exception handler method parameter types:

  • An exception argument: declared as a general Exception or as a more specific exception. This also serves as a mapping hint if the annotation itself does not specify the exception types using its value().
  • Request objects or response objects or both (typically from the Servlet API): You can choose any specific request or response type, for example ServletRequest or HttpServletRequest. To use the Servlet API, you must add the quarkus-undertow dependency to your project.
Note

The order in which the types are listed is arbitrary and does not reflect the order of preference in which individual parameter types should be used.

Other parameter types that are mentioned in the Spring ExceptionHandler Java API documentation are not supported in Quarkus

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat