Add statusCode to errorHandler