working on the responses for errors server side