error management
This commit is contained in:
@@ -53,9 +53,9 @@ export class PagePassword implements OnInit, OnDestroy {
|
||||
this.working = false;
|
||||
if (error.status == 409) {
|
||||
let errors = {};
|
||||
for (let code of error.error) {
|
||||
errors[code.field] = errors[code.field] || {};
|
||||
errors[code.field][code.code] = true;
|
||||
for (let errorObject of error.error) {
|
||||
errors[errorObject.field] = errors[errorObject.field] || {};
|
||||
errors[errorObject.field][errorObject.code] = errorObject.arguments || true;
|
||||
}
|
||||
|
||||
for (let code in errors) {
|
||||
|
||||
Reference in New Issue
Block a user