Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables metadata in exceptions, adds some metadata to CastErrors #220

Closed
wants to merge 1 commit into from

Conversation

akariv
Copy link
Member

@akariv akariv commented Sep 13, 2018

Exceptions in tableschema contain very little info on the reason for the exception (apart from a text message).
For automated processing we want to know more on the source of the error.
I've made a simple change which adds generic metadata to the tableschema exceptions, and added such metadata to CastErrors sent around the library.

This shouldn't create any compatibility issues with existing code.

@akariv akariv requested a review from roll September 13, 2018 13:39
@roll
Copy link
Member

roll commented Sep 17, 2018

@akariv
Thanks. I also always expected that we would extend our Error API. Just a few concerns regarding the exact proposal and also similar frictionlessdata/tableschema-js#147:

So regarding this PR I'm wondering why don't we just expose:

  • error.schema (Schema/None)
  • error.field (Field/None)
  • error.row (Row/None)
  • etc

I mean the already existent API which could be present for error or not (depending on an error context). In this case we don't need additionally e.g. document that medata have field.name key. We just need to link the Field API documentation.

And about naming:

  • duplicate_row - in Data Quality Spec (we follow it for a lot of Py/Js software) e.g. this one will be duplicate_row_number
  • etc

WDYT?

@roll
Copy link
Member

roll commented Sep 17, 2018

For a reference, we already have slightly extended error API for Javascript - https://github.com/frictionlessdata/tableschema-js#errors

@roll roll added the wip label Apr 15, 2019
@stale
Copy link

stale bot commented Jul 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 15, 2019
@stale stale bot closed this Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants