Upgrade basic errors to error class