Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

How to use error handler helpers in glimmer version? #468

@SandeepJoel

Description

@SandeepJoel
import { redirectToLogin } from 'new-frontend/utils/route-helpers';
import { UnauthorizedError } from 'ember-ajax/errors';

function commonErrorHandler(error) {
  if (UnauthorizedError(error)) {
    redirectToLogin.call(this);
  }
}

export { commonErrorHandler };

I have this function in utility. Whenever I call the function commonErrorHandler, I'm getting the following error.

Screenshot 2022-07-02 at 1 55 52 PM

Screenshot 2022-07-02 at 1 56 00 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions