Skip to content

Commit

Permalink
small validation error message formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
solarw committed Feb 15, 2023
1 parent 5fd694b commit 901f201
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 901f201

Please sign in to comment.