add error handler in backend requests