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):
121121 sentry_target = sentry_url .netloc .split ("@" )[- 1 ]
122122 # NOTE: sentry doesn't support a global search. A proper link would require the specific org
123123 sentry = f"{ sentry_url .scheme } ://{ sentry_target } /organizations/sentry?query={ sentry } "
124- except Exception :
124+ except Exception : # nosec
125125 pass
126126 except KeyError as e :
127127 sentry = f"Unexpected error while reporting to Sentry: { str (e )} "
@@ -348,6 +348,19 @@ def __init__(self, exception=None):
348348 super ().__init__ (exception = exception )
349349
350350
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+
351364class UserOutdatedProjectError (ServiceError ):
352365 """The operation can be done only after updating the target project."""
353366
Original file line number Diff line number Diff line change 2828 AuthenticationError ,
2929 DatasetExistsError ,
3030 DatasetImageError ,
31+ DatasetNotFound ,
3132 DockerfileUpdateError ,
3233 GitCommandError ,
3334 GitError ,
6566 ProgramUpdateProjectError ,
6667 ServiceError ,
6768 UserDatasetsMultipleImagesError ,
69+ UserDatasetsNotFoundError ,
6870 UserDatasetsUnlinkError ,
6971 UserDatasetsUnreachableImageError ,
7072 UserInvalidGenericFieldsError ,
@@ -368,6 +370,8 @@ def decorated_function(*args, **kwargs):
368370 if "" .join (value ) == "Field may not be null." :
369371 raise UserMissingFieldError (e , key )
370372 raise
373+ except DatasetNotFound as e :
374+ raise UserDatasetsNotFoundError (e )
371375 except DatasetExistsError as e :
372376 raise IntermittentDatasetExistsError (e )
373377 except RenkuException as e :
You can’t perform that action at this time.
0 commit comments