Join Slack
Powered by
Is it possible to set a http status from a RESTlet...
# suitescript
e
Eystein Bye
01/18/2021, 1:00 PM
Is it possible to set a http status from a RESTlet? On return its 200 and if I `throw error.create`I get 400. But I would like to set 404 etc.
Eystein Bye
01/18/2021, 2:04 PM
Looks like 400 is the only error-code that users can set
400 BAD_REQUEST: The RESTlet request failed with a user error.
s
stalbert
01/18/2021, 3:33 PM
yup, you don't get to control http codes. RESTlets aren't really RESTful
p
Petter
01/18/2021, 4:10 PM
this is a conversation I’d like to not have yet another time when we have a fullstack dev integrating to NS
s
stalbert
01/18/2021, 4:12 PM
NFT can't solve for RESTlets not being RESTful but it does present a more familiar interface for a fullstack dev coming to NS development.
24
Views
Open in Slack
Previous
Next