@indigina/kendo 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -898,7 +898,7 @@ class FormGroupWithErrors extends UntypedFormGroup {
898
898
  }
899
899
  applyServerErrors(error, form) {
900
900
  this.generalErrors = [];
901
- if (error.title) {
901
+ if (Object.keys(error.errors).length > 1 && error.title) {
902
902
  this.generalErrors.push(error.title);
903
903
  }
904
904
  if (!form) {
@@ -1127,7 +1127,11 @@ class HttpService {
1127
1127
  this.appToastrService.showError(`${this.translate.instant('ToastrMessages.ServerError')}${error.error.title}`);
1128
1128
  return of(null);
1129
1129
  }
1130
- return throwError(error);
1130
+ if (error.status === HttpCodes.BadRequest) {
1131
+ this.appToastrService.showError(`${this.translate.instant('ToastrMessages.ValidationError')}${error.error.title}`);
1132
+ return throwError(() => error);
1133
+ }
1134
+ return throwError(() => error);
1131
1135
  }
1132
1136
  showSuccessMessage(message) {
1133
1137
  this.appToastrService.showSuccess(this.translate.instant(message));