Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (14 loc) · 707 Bytes

File metadata and controls

22 lines (14 loc) · 707 Bytes

Throw behavior

The THROW behavior will throw an explicit exception.

Note, leveraging the PRE and POST syntax should be use to indicate if the error should be thrown before, or after, the standard processing of the API.

Value format

The value for this behavior has currently no use. You may pass anything (0 or empty strings are fine).

Example

Throw an exception before the standard API execution for the tron having an id of javatron1

curl -i "http://localhost:8081/api/inventory/2" -H "x-demo-throw-pre-javatron1: 0"

Throw an exception after the standard API execution for all trons

curl -i "http://localhost:8081/api/inventory/2" -H "x-demo-throw-post: 0"