added context to error handler
added context to error handler