test custom error handler