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

Discuss common ErrorStructure #7

Open
sergey-shandar opened this issue Mar 21, 2019 · 6 comments
Open

Discuss common ErrorStructure #7

sergey-shandar opened this issue Mar 21, 2019 · 6 comments
Assignees

Comments

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Mar 21, 2019

Proposed structure

type DerivedError = {
  readonly code: string
  readonly nested: Error
}
type FinalError = {
  readonly code: string
  readonly message: string
}
type Error = DerivedError | FinalError

Questions:

  • helpUrl?
  • consistent location format.
  • nested errors.
@sergey-shandar
Copy link
Contributor Author

@vladbarosan @veronicagg

@sergey-shandar sergey-shandar self-assigned this Mar 21, 2019
@sergey-shandar
Copy link
Contributor Author

sergey-shandar commented Apr 4, 2019

Also we need unique id for each error for diff tools.
Unique fields:

  • code
  • file url (may be, unless renamed)
  • JSON reference with some changes, for example OpenAPI
    • path should have no parameters.
    • rename of parameters should have no effect if they are in path or in body.

@vladbarosan
Copy link

@sergey-shandar when you mean unique id, you mean a code or an extra ID field ( e.g. OAD123). I thought we dont want to have an extra id on top of the code.

@sergey-shandar
Copy link
Contributor Author

@vladbarosan The unique id of error as nothing to do with code or an extra ID field (aka error type). This is an error id which should be the same for another run of avocado on slightly modified code base. It's required for detecting new errors in PR.

@sergey-shandar
Copy link
Contributor Author

@billytrend

@vladbarosan
Copy link

vladbarosan commented Apr 4, 2019

@sergey-shandar , so I think as we discussed action item here is to see what fields to calculate on ( obvious candidates are error code and jsonRef (with our without the file url ). either way we should err on the side of false positives ( i.e. report as new even if they are not )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants