Made error message Json format