Added more details while sending errors to client.