fix in error handler

pass along the status code and error body