better handling for status errors