File tree 1 file changed +9
-1
lines changed
source-shopify-native/source_shopify_native/graphql
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 9
9
BulkSpecificJobResponse ,
10
10
BulkJobSubmitResponse ,
11
11
BulkOperationDetails ,
12
+ BulkOperationErrorCodes ,
12
13
BulkOperationStatuses ,
13
14
BulkOperationTypes ,
14
15
UserErrors ,
@@ -194,7 +195,14 @@ async def execute(self, query: str) -> str | None:
194
195
await asyncio .sleep (delay )
195
196
delay = min (delay * 2 , MAX_SLEEP )
196
197
case BulkOperationStatuses .CANCELED | BulkOperationStatuses .CANCELING | BulkOperationStatuses .EXPIRED | BulkOperationStatuses .FAILED :
197
- raise BulkJobError (f"Unanticipated status { details .status } for job { job_id } . Error code: { details .errorCode } ." )
198
+ msg = f"Unanticipated status { details .status } for job { job_id } . Error code: { details .errorCode } ."
199
+ if details .errorCode and details .errorCode == BulkOperationErrorCodes .ACCESS_DENIED :
200
+ msg = (
201
+ f'Bulk job { job_id } has failed because the provided credentials do not have sufficient permissions.'
202
+ f' If authenticating with an access token, ensure it is granted the permissions listed at'
203
+ f' https://docs.estuary.dev/reference/Connectors/capture-connectors/shopify-native/#access-token-permissions.'
204
+ )
205
+ raise BulkJobError (msg )
198
206
case _:
199
207
raise BulkJobError (f"Unknown status { details .status } for job { job_id } ." )
200
208
You can’t perform that action at this time.
0 commit comments