encodeagent-helper-lambda
TypeScript icon, indicating that this package has built-in type declarations

1.0.156 • Public • Published

encodeagent-helper-lambda

Always throw error

throw {
    //http error: it is optional, only required if the called is a lambda function
    ...HTTPERROR_400,
    //type: suggest to have it for every error
    type: "ERROR_API_ERROR",
    //source: keep the module name and function name
    source: "auth.signIn",
    //message: provide human readable error message. this optional, we should leave the caller to handle it with proper message that may also support multi-langurage
    message: "",
    //detail: provide helpful data to help understand the error better, it can have any data in it.
    detail: {
        reason: "",
        ...anything
    },
    //error: this is the inner error.
    error
};

/encodeagent-helper-lambda/

    Package Sidebar

    Install

    npm i encodeagent-helper-lambda

    Weekly Downloads

    98

    Version

    1.0.156

    License

    PRIVATE

    Unpacked Size

    510 kB

    Total Files

    90

    Last publish

    Collaborators

    • primeobjects