Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

24.2. RESTEasy Built-in Internally-Thrown Exceptions


RESTEasy has a set of built-in exceptions that are thrown when an error is encountered during dispatching or marshalling. Each exception matches a specific HTTP error code. The full list is available in the RESTEasy Java Documentation, under the org.jboss.resteasy.spi package. The following table lists the most common exceptions:
Expand
Table 24.1. Common Exceptions
Exception HTTP Code Description
BadRequestException 400 Bad Request. Request was not formatted correctly or there was a problem processing request input.
UnauthorizedException 401 Unauthorized. Security exception thrown if you use RESTEasy's simple annotation- and role-based security.
InternalServerError Exception 500 Internal Server Error.
MethodNotAllowed Exception 405 Method Not Allowed. There is no JAX-RS method for the resource that can handle the invoked HTTP operation.
NotAcceptableException 406 Not Acceptable. There is no JAX-RS method that can produce the media types listed in the Accept header.
NotFoundException 404 Not Found. There is no JAX-RS method that serves the request path/resource.
Failure N/A Internal RESTEasy. Not logged.
LoggableFailure N/A Internal RESTEasy error. Logged.
DefaultOptionsMethod Exception N/A If the user invokes HTTP OPTIONS without a JAX-RS method, RESTEasy provides a default behavior by throwing this exception.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat