Not Found Handler
You can set a custom code for not found routes using: <API>.setNotFoundHandler
method.
var api = new API(...);
api.setNotFoundHandler(`$reply[ $setCode[404] $setType[json] $setBody[{ "msg": "route not found." }]]`);