Skip to content

Overriding handleError #267

Description

@mangicapra

"angular2-jsonapi": "^8.2.1"

In readme is stated 'It's also possible to handle errors for all requests by overriding handleError(error: any): Observable in the datastore.'.

So i'm interested how can i achieve this behaviour? This is auth datastore and should it be possible to override it in here.

const config: DatastoreConfig = {
baseUrl: ${environment.baseUrl}/auth,
models: {
login: Login,
refresh: Refresh,
},
};
@Injectable({
providedIn: 'root',
})
@JsonApiDatastoreConfig(config)
export class DatastoreService extends JsonApiDatastore {
constructor(public http: HttpClient) {
super(http);
}
}

Thanks :)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions