Skip to content

Uncaught (in promise) undefined #572

Closed
@JulianGaibler

Description

@JulianGaibler

Hi there!

I'm authenticating requests via cookies. If a user is not logged in, the server responds with this error message:
response

Now, of course I want to catch this error in my Vue-Component:

methods: {
    tryNow() {
      this.$apollo.addSmartQuery('user', {
        query: gql `
          {
              me {
                  username
              }
          }`,
        error(e) {
          console.log(e.message)
          return true;
        },
      })
    }
  }
}

But for some reason this error always shows up in my console, saying that there is an uncatched Promise:
console

I already had a look around here at related issues, especially #519 and #265. Sadly, I can't really pinpoint where this error even comes from, because Chrome and Firefox show me completely different stacktraces, not even pointing to the error. At least Chrome said the error is from somewhere inside vue-apollo.esm.js, so here I am now.

I created the project with the Vue-Cli and didn't change much of the original config, so I'm thinking this might be a bug?

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