Extract an error class