File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ impl Config {
8686 url = self . storage. endpoint_url( ) ,
8787 cause = inner
8888 ) ,
89+ Err ( ObjectStorageError :: AuthenticationError ( inner) ) => panic ! (
90+ "Failed to authenticate. Please ensure credentials are valid\n Caused by: {cause}" ,
91+ cause = inner
92+ ) ,
8993 Err ( error) => { panic ! ( "{error}" ) }
9094 }
9195 }
Original file line number Diff line number Diff line change @@ -494,6 +494,14 @@ impl From<SdkError<HeadBucketError>> for ObjectStorageError {
494494 } ,
495495 ..
496496 } => ObjectStorageError :: NoSuchBucket ( S3_CONFIG . bucket_name ( ) . to_string ( ) ) ,
497+ SdkError :: ServiceError {
498+ err :
499+ HeadBucketError {
500+ kind : HeadBucketErrorKind :: Unhandled ( err) ,
501+ ..
502+ } ,
503+ ..
504+ } => ObjectStorageError :: AuthenticationError ( err) ,
497505 SdkError :: DispatchFailure ( err) => ObjectStorageError :: ConnectionError ( Box :: new ( err) ) ,
498506 SdkError :: TimeoutError ( err) => ObjectStorageError :: ConnectionError ( err) ,
499507 err => ObjectStorageError :: UnhandledError ( Box :: new ( err) ) ,
Original file line number Diff line number Diff line change @@ -216,6 +216,8 @@ pub enum ObjectStorageError {
216216 DataFusionError ( #[ from] datafusion:: error:: DataFusionError ) ,
217217 #[ error( "Unhandled Error: {0}" ) ]
218218 UnhandledError ( Box < dyn std:: error:: Error + Send + ' static > ) ,
219+ #[ error( "Authentication Error: {0}" ) ]
220+ AuthenticationError ( Box < dyn std:: error:: Error + Send + ' static > ) ,
219221}
220222
221223impl From < ObjectStorageError > for crate :: error:: Error {
You can’t perform that action at this time.
0 commit comments