providers: slight rework of error handling

  there are still a few corner cases that need to be adressed