Skip to content

Commit 3a8db5b

Browse files
authored
Fix typos in calling ValidationException and allow target to be over-writeable in UserException (Azure#28585)
* Update _model_operations.py * Update exceptions.py
1 parent 8725d93 commit 3a8db5b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,11 @@ def __init__(
486486
message,
487487
no_personal_data_message=None,
488488
error_category=ErrorCategory.USER_ERROR,
489+
target: ErrorTarget = ErrorTarget.PIPELINE
489490
):
490491
super().__init__(
491492
message=message,
492-
target=ErrorTarget.PIPELINE,
493+
target=target,
493494
no_personal_data_message=no_personal_data_message,
494495
error_category=error_category,
495496
)

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def create_or_update(
139139
raise ValidationException(
140140
message=msg,
141141
no_personal_data_message=msg,
142-
error_target=ErrorTarget.MODEL,
142+
target=ErrorTarget.MODEL,
143143
error_category=ErrorCategory.USER_ERROR,
144144
)
145145

0 commit comments

Comments
 (0)