Skip to content

Commit d24e2ca

Browse files
authored
fixed error to show backend error response
1 parent 5121c28 commit d24e2ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/book/book.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class BookComponent implements OnInit {
3434
if (err.status === 0) {
3535
this.formErrors.push('please check your backend server.');
3636
} else {
37-
const errors = JSON.parse(err.error);
37+
const errors = err.error;
3838
const items = [];
3939
for (const key in errors) {
4040
if (errors.hasOwnProperty(key)) {

0 commit comments

Comments
 (0)