added JSON error response