Skip to content

Commit b5a7c11

Browse files
committed
Updated pr.
1 parent 20cd628 commit b5a7c11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ads/aqua/evaluation/evaluation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ def create(
158158
try:
159159
create_aqua_evaluation_details = CreateAquaEvaluationDetails(**kwargs)
160160
except Exception as ex:
161+
custom_errors = {
162+
".".join(map(str, e["loc"])): e["msg"] for e in json.loads(ex.json())
163+
}
161164
raise AquaValueError(
162-
"Invalid create evaluation parameters. "
163-
"Allowable parameters are: "
164-
f"{', '.join([field for field in CreateAquaEvaluationDetails.model_fields])}."
165+
f"Invalid create evaluation parameters. Error details: {custom_errors}."
165166
) from ex
166167

167168
if not is_valid_ocid(create_aqua_evaluation_details.evaluation_source_id):

0 commit comments

Comments
 (0)