Skip to main content

Error handling

The plug-in RESTful service handlers can raise different errors.

Debugging

All errors raised while processing RESTful service requests can be easily debugged using the plug-in RESTful service logs stored in the table AOE_REST_LOGS. To easily read logs, the sample application has an AOE RESTful Service Logs page showing the data. It is strongly recommended to copy this page to the application in which AOE is used.

The AOE RESTful Service Logs page shows all RESTful requests grouped by view identifier. All errors mentioned in the next section, Errors, contain the AOE REST debug id, which can be used to filter logs by view identifier column. The page UI mimics the APEX View Debug page for a developer's convenience, and details about the incident can be found in the details view.

For example, AOE raised an error while saving a document as a new file

Unhandled PL/SQL Save As

In the AOE RESTful Service Logs, click on the identifier 48401672048084750 to see details about the request.

Error handling Logs

Error handling Details

Handled Errors

The AOE RESTful service handles errors to some extent. All errors the end-user can face while working with the plug-in are listed and described below.

Document not found

The error is raised by the RESTful handler Get a document information when the requested document can't be found - no_data_found error is raised by the PL/SQL code.

error_handling_doc_not_found

The end-user can't read a document

The error is raised by the RESTful handler Get document information when the current end-user permissions are not sufficient to load a requested document.

error_handling_user_cant_read.webp

Invalid access token

The error can be raised by all RESTful handlers when the access token used for the request is invalid or expired. The plug-in generates the access token before any request is made and is used to secure the RESTful service request.

image-20221225140512391

Invalid Access Token - Content

Invalid Access Token - Update

Invalid Access Token - Save As

Invalid Access Token - Rename

Invalid file type

The error is raised by the RESTful handler Get document information when the requested document type is not enabled on the Oracle APEX page designer level.

Invalid File Type

Malformed last update time

The error is raised by the RESTful handler Update a document's contents when a document's last modification time doesn't match the value sent over the request header.

Malformed Update time

Malformed request header (filenames)

The error is raised by the RESTful Service handlers Save a document as copy with a new filename and Rename a document when request headers X-WOPI-RelativeTarget and X-WOPI-SuggestedTarget are both NOT NULL.

Malformed Request Header

Malformed Request Header rename

Malformed request header (missing filename)

The error is raised by the RESTful Service handler Save a document as copy with a new filename and Rename a document when request headers X-WOPI-RelativeTarget and X-WOPI-SuggestedTarget are both NULL.

Malformed Request Header - Save As

Malformed Request Header - Rename

Malformed request header (PUT_RELATIVE or RENAME_FILE)

The error is raised by the RESTful Service handler Save document as copy with a new filename and Rename a document when request headers X-WOPI-Override is invalid.

Malformed Request Header - Save As

Malformed Request Header - Rename

Unhandled PL/SQL Error

The error can be raised by all RESTful handlers when an unhandled PL/SQL Error is raised. Most likely, the error is raised by custom PL/SQL code written by a developer in PL/SQL callbacks or custom PL/SQL implementation.

Unhandled PL/SQL Metadata

Unhandled PL/SQL Content

Unhandled PL/SQL Update

Unhandled PL/SQL Rename

Unhandled PL/SQL Save As