Scripted REST API - Not found error

PHOTO EMBED

Thu Sep 30 2021 07:48:52 GMT+0000 (UTC)

Saved by @mathiasVDD

/**
 * Error Response: Not Found Error Sample
 */
(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
    response.setError(new sn_ws_err.NotFoundError('sample error message'));
})(request, response);
content_copyCOPY

https://docs.servicenow.com/bundle/rome-application-development/page/integrate/custom-web-services/reference/r_ScriptedRESTServiceScriptExamples.html