updated exception handling with providers and decorators