One technique I have seen is adding a JSON propert...
# suitescript
s
One technique I have seen is adding a JSON property to your response object, such as httpCode, and setting it to the code you want. The client/calling code will need to look at that property instead of the actual HTTP response code, though.