Skip to content

trafaret.DataError's method as_dict returns either string or dict #68

Open

Description

@thenx

Is that intended to be so or just some legacy code or smth?
IMHO, it is:

  1. Misguiding
  2. Introduces necessity to validate and convert the result

Wouldn't it be better to always return dicts?

Activity

  1. Deepwalker commented on Jul 17, 2017

    @Deepwalker
    Owner

    Again this is a long time behaviour and definitely it need to be solved. Will think.

  2. thenx commented on Jul 17, 2017

    @thenx
    Author

    This also results in aiohttp_admin's exceptions during passing validation errors to frontend in util.py and mongo_utils.py (lines with **exc.as_dict())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions