Add handling of generic errors