Official Docs: sn_ws_err

Error types which can be set as the response body of a Scripted REST API

BadRequestError

Sets status code 400 and includes the specified message in the response

ConflictError

Sets status code 409 and includes the specified message in the response

NotAcceptableError

Sets status code 406 and includes the specified message in the response

NotFoundError

Sets status code 404 and includes the specified message in the response

ServiceError

A generic error message wrapper to set status code and detailed error message in the response

UnsupportedMediaTypeError

Sets status code 415 and includes the specified message in the response