chore(fix): fixes sync response not correctly identifying all errors (#2346)

This commit is contained in:
Mo
2023-07-05 11:28:45 -05:00
committed by GitHub
parent 2a050fd966
commit 0ab6b5c6fe
19 changed files with 81 additions and 49 deletions

View File

@@ -1,6 +1,12 @@
import { Base64String } from '@standardnotes/sncrypto-common'
import { EncryptionProviderInterface, SNRootKey, SNRootKeyParams } from '@standardnotes/encryption'
import { HttpResponse, SignInResponse, User, isErrorResponse } from '@standardnotes/responses'
import {
HttpResponse,
SignInResponse,
User,
getErrorFromErrorResponse,
isErrorResponse,
} from '@standardnotes/responses'
import { KeyParamsOrigination, UserRequestType } from '@standardnotes/common'
import { UuidGenerator } from '@standardnotes/utils'
import { UserApiServiceInterface, UserRegistrationResponseBody } from '@standardnotes/api'
@@ -227,7 +233,7 @@ export class UserService
if (isErrorResponse(response)) {
return {
error: true,
message: response.data.error.message,
message: getErrorFromErrorResponse(response).message,
}
}