mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[PM-14484] ApiService showing html in error message (#14658)
* Make ApiService more testable * Add ApiService tests * Switch to only reading text/plain content
This commit is contained in:
@@ -337,6 +337,7 @@ import {
|
||||
CLIENT_TYPE,
|
||||
DEFAULT_VAULT_TIMEOUT,
|
||||
ENV_ADDITIONAL_REGIONS,
|
||||
HTTP_OPERATIONS,
|
||||
INTRAPROCESS_MESSAGING_SUBJECT,
|
||||
LOCALES_DIRECTORY,
|
||||
LOCKED_CALLBACK,
|
||||
@@ -700,6 +701,10 @@ const safeProviders: SafeProvider[] = [
|
||||
},
|
||||
deps: [ToastService, I18nServiceAbstraction],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: HTTP_OPERATIONS,
|
||||
useValue: { createRequest: (url, request) => new Request(url, request) },
|
||||
}),
|
||||
safeProvider({
|
||||
provide: ApiServiceAbstraction,
|
||||
useClass: ApiService,
|
||||
@@ -712,6 +717,7 @@ const safeProviders: SafeProvider[] = [
|
||||
LogService,
|
||||
LOGOUT_CALLBACK,
|
||||
VaultTimeoutSettingsService,
|
||||
HTTP_OPERATIONS,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
|
||||
Reference in New Issue
Block a user