Exception handling
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The REST API framework expects the REST handler methods to throw exceptions of
RequestException type. The RequestException
requires an HTTP response code and a description text that is used to return an error to
the client. However, an inner exception may also be passed to the constructor.
If a RequestException is thrown from a REST handler method, the framework
considers it as a known exception and returns a JSON formatted response body with error
text to the client. In some cases, the REST handler method might throw any subclass of
RequestException.
The framework considers the RequestException as
a normal termination of the REST handler method and does not log the exception. On other
hand, an exception that does not extend RequestException
is considered as an application error and recorded in the fathom error log file. The
client then receives a response body with error text HTTP 500
Internal Server Error from the exception.
RequestException:
|
|