-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
When initializing flagsmith with an angular httpClient, it causes fetch error "Fetch error: [object Object]"
private readonnly httpClient = inject(HttpClient);
flagsmith.init({
environmentID: 'XXXXXXXXXX',
onChange: () => {},
angularHttpClient: this.http
})
This is due the case that in the getJSON we check the response status number code for in between 200 and 300 (see flagsmith-core.ts#L869C1-L870C1). The angular fetch utils which builds the response object in case using the angular http client does not have any numeric status property. (see angular-fetch.ts#L10)
Verified in version 8.0.3 and back until 3.24.0.
Metadata
Metadata
Assignees
Labels
No labels