Skip to content

Unhandled promise rejection: Error: You must be logged in [logged-out] #17

@StorytellerCZ

Description

@StorytellerCZ

I have been getting the following error lately:

Image

The thing is that I do have a .catch on the client where it is called, so I would assume that the error gets passed down to the client without crashing the server.

Here is how I call the method on client:

trackerStartCall({
      teamId: teamId || profile.teamId,
      workgroupId: selectedWorkgroupId,
      demoCall: isDemoCall,
    })
      .catch((error: Meteor.Error) => {
        if (error) {
          Log.error(error.reason)
          setError('insertError')
          catchError = true
        }
      })

And here is the method definition:

export const trackerStartCall = createMethod({
  name: 'trackerStartCall',
  schema: { teamId: String, workgroupId: String, demoCall: Match.Maybe(Boolean) },
  async run({
    teamId,
    workgroupId,
    demoCall = false,
  }: { teamId: string; workgroupId: string; demoCall?: boolean }) {
// ...
}

Am I missing some catch or should I put try/catch block around the method? Either way I find it strange that such a standard error causes the unhanded promise rejection.

These errors start to after failed check, not sure how much it is related:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions