File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def _handle_sentry(self):
121
121
sentry_target = sentry_url .netloc .split ("@" )[- 1 ]
122
122
# NOTE: sentry doesn't support a global search. A proper link would require the specific org
123
123
sentry = f"{ sentry_url .scheme } ://{ sentry_target } /organizations/sentry?query={ sentry } "
124
- except Exception :
124
+ except Exception : # nosec
125
125
pass
126
126
except KeyError as e :
127
127
sentry = f"Unexpected error while reporting to Sentry: { str (e )} "
@@ -348,6 +348,19 @@ def __init__(self, exception=None):
348
348
super ().__init__ (exception = exception )
349
349
350
350
351
+ class UserDatasetsNotFoundError (ServiceError ):
352
+ """Dataset couldn't be found in project."""
353
+
354
+ code = SVC_ERROR_USER + 133
355
+ userMessage = (
356
+ "The dataset doesn't exist in the project. Please check your inputs or create the target dataset first."
357
+ )
358
+ devMessage = "The dataset couldn't be found in the project."
359
+
360
+ def __init__ (self , exception = None ):
361
+ super ().__init__ (exception = exception )
362
+
363
+
351
364
class UserOutdatedProjectError (ServiceError ):
352
365
"""The operation can be done only after updating the target project."""
353
366
Original file line number Diff line number Diff line change 28
28
AuthenticationError ,
29
29
DatasetExistsError ,
30
30
DatasetImageError ,
31
+ DatasetNotFound ,
31
32
DockerfileUpdateError ,
32
33
GitCommandError ,
33
34
GitError ,
65
66
ProgramUpdateProjectError ,
66
67
ServiceError ,
67
68
UserDatasetsMultipleImagesError ,
69
+ UserDatasetsNotFoundError ,
68
70
UserDatasetsUnlinkError ,
69
71
UserDatasetsUnreachableImageError ,
70
72
UserInvalidGenericFieldsError ,
@@ -368,6 +370,8 @@ def decorated_function(*args, **kwargs):
368
370
if "" .join (value ) == "Field may not be null." :
369
371
raise UserMissingFieldError (e , key )
370
372
raise
373
+ except DatasetNotFound as e :
374
+ raise UserDatasetsNotFoundError (e )
371
375
except DatasetExistsError as e :
372
376
raise IntermittentDatasetExistsError (e )
373
377
except RenkuException as e :
You can’t perform that action at this time.
0 commit comments