/**
 * A dictionary of codes for errors produced by this package.
 */ export enum ErrorCode { PromiseTimeout = 'SLACKMESSAGEUTIL_PROMISE_TIMEOUT' , SignatureVerificationFailure = 'SLACKHTTPHANDLER_REQUEST_SIGNATURE_VERIFICATION_FAILURE' , RequestTimeFailure = 'SLACKHTTPHANDLER_REQUEST_TIMELIMIT_FAILURE' , BodyParserNotPermitted = 'SLACKADAPTER_BODY_PARSER_NOT_PERMITTED_FAILURE' } /**
 * All errors produced by this package are regular
 *  https objects with
 * an extra  CodedError . code field.
  export interface CodedError extends Error { /**
     * What kind of error occurred.
     */ code : ErrorCode ; } /**
 * Factory for producing a  CodedError from a generic error.
  export function errorWithCode ( error , code ) { const codedError = error as CodedError ; codedError . code = code ; return codedError ; }