UBAbort

@unitybase/ub.ubErrors~ UBAbort

new UBAbort(messageopt)

Server-side Abort exception. To be used in server-side logic in case of HANDLED exception. This errors logged using "Error" log level to prevent unnecessary EXC log entries.

  // UB client will show message inside <<<>>> to user (and translate it using UB.i18n)
  const UB = require('@unitybase/ub')
  throw new UB.UBAbort('<<<textToDisplayForClient>>>')
  // for API methods we do not need <<<>>>
  throw new UB.UBAbort('wrongParameters')
Arguments:
  1. [message] (String)  Message

Extends