fix format of the error responses