Skip to content

Commit

Permalink
Merge pull request #575 from valory-xyz/fix/better_error_msg_for_conf…
Browse files Browse the repository at this point in the history
…iguration_validation

small validation error message formatting fix
  • Loading branch information
DavidMinarsch authored Feb 20, 2023
2 parents b3e1bca + 901f201 commit 9140c66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aea/configurations/validation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2022-2023 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -243,7 +243,7 @@ def _validate(self, instance: Dict) -> None:
@staticmethod
def _build_message_from_errors(errors: List[jsonschema.ValidationError]) -> str:
"""Build an error message from validation errors."""
path = lambda error: ".".join(list(error.path)) # noqa # type: ignore
path = lambda error: "::".join(map(str, error.path)) # noqa
result = [f"{path(error)}: {error.message}" for error in errors]
return "The following errors occurred during validation:\n - " + "\n - ".join(
result
Expand Down

0 comments on commit 9140c66

Please sign in to comment.