mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
show string errors
This commit is contained in:
@@ -12,7 +12,9 @@ export class ValidationService {
|
|||||||
const defaultErrorMessage = this.i18nService.t('unexpectedError');
|
const defaultErrorMessage = this.i18nService.t('unexpectedError');
|
||||||
const errors: string[] = [];
|
const errors: string[] = [];
|
||||||
|
|
||||||
if (data == null || typeof data !== 'object') {
|
if (data != null && typeof data === 'string') {
|
||||||
|
errors.push(data);
|
||||||
|
} else if (data == null || typeof data !== 'object') {
|
||||||
errors.push(defaultErrorMessage);
|
errors.push(defaultErrorMessage);
|
||||||
} else if (data.validationErrors == null) {
|
} else if (data.validationErrors == null) {
|
||||||
errors.push(data.message ? data.message : defaultErrorMessage);
|
errors.push(data.message ? data.message : defaultErrorMessage);
|
||||||
|
|||||||
Reference in New Issue
Block a user