open id 

HomeGeneral Q & A

Custom HTTP Response Codes Messages in this topic - RSS

Gruber
Gruber
Posts: 102


4/16/2019
Gruber
Gruber
Posts: 102
I was wondering if Decisions supports the ability to send custom HTTP response codes (eg. 401 Unauthorized, 400 Bad Request) as an output to a flow that is called as a REST API?
0 link
kshitij@decisions.com
kshitij@decisions.com
Administrator
Posts: 208


4/16/2019
kshitij@decisions.com
kshitij@decisions.com
Administrator
Posts: 208
We have a step called Throw API Exception which allows you to set Custom HTTP Response Codes in your Error Response. However please note, some of the HTTP Codes are restricted and cannot be set by a Step (IIS does not permit this), i.e. 401.







This step can be found under the Flow Management category in the Steps dialog.
edited by kshitij@decisions.com on 4/16/2019
0 link
anthony.ben@decisions.com
anthony.ben@decisions.com
Administrator
Posts: 70


4/29/2022
anthony.ben@decisions.com
anthony.ben@decisions.com
Administrator
Posts: 70
In addition, a new step has been added in 7.9+ which can return custom response headers along with the status code.

https://documentation.decisions.com/v8/docs/throw-api-exception-with-headers
0 link






Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software