Crypto Lib
    Preparing search index...

    Function isCallerErrorCode

    • Whether a CryptoError code means the caller's input was at fault (bad input, a failed authentication or signature check, an expired token), as opposed to a fault on crypto-lib's side. A server answers the first with a 4xx and the second with a 5xx. Unknown codes are not caller errors.

      Parameters

      • code: string

      Returns boolean

      if (err instanceof CryptoError && isCallerErrorCode(err.code)) reply400();