Skip to content

Example for asserting HttpsError thrown by cloud function #182

Description

@nilsreichardt

It would be really nice to have an example how to assert HttpsError, which are thrown by a cloud function.

exports.testCallable = functions.https.onCall((data, context) => {
    console.log('testCallable');
    return new functions.https.HttpsError('ok', 'this is an error');
})

How to write a test, that a HttpsError with the message this is an error was thrown?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions