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

Make error messages consistent and uniform across python and go SDK #221

Open
shramroy opened this issue Oct 20, 2021 · 1 comment · May be fixed by #449
Open

Make error messages consistent and uniform across python and go SDK #221

shramroy opened this issue Oct 20, 2021 · 1 comment · May be fixed by #449
Assignees
Labels
priority High Priority ux Impacts UX
Milestone

Comments

@shramroy
Copy link
Contributor

Observation from Snappi version: 0.6.5

Some error message I am mentioning here for example -

  1. '0 <= PatternFlowIpv4TosReliability.Value <= 1 but Got 2\nvalidation errors'
  • suggested way - PatternFlowIpv4TosReliability.Value is not in range [0, 1]
  1. 'PortName is required field on interface DeviceEthernet'
  • Adding line number for which error is coming will be helpful for this type of scenarios.
@ashutshkumr
Copy link
Contributor

@ajbalogh FYI

We need to put some effort in ensuring that error is more consistent. Some basic rules that we need to follow are:

  • Use node names as used in openapi yaml. e.g. ipv4.src.value instead of PatternFlowIpv4Src.Value
  • Try to pinpoint exact node in which error occurred. e.g. flows[0].packet[1].src.value
    • This maybe a little difficult to achieve, but failing to provide exact node where the error occurred might be confusing

Before implementing this, let's have a list of all possible errors for an example node and see if they look ok.

@ashutshkumr ashutshkumr transferred this issue from open-traffic-generator/snappi Oct 27, 2021
@Rangababu-R Rangababu-R mentioned this issue Feb 2, 2022
@ashutshkumr ashutshkumr changed the title Gosnappi: Error-logging can be more effective so that it becomes more readable for users Make error messages consistent and uniform across python and go SDK Feb 28, 2022
@ashutshkumr ashutshkumr added the enhancement New feature or request label Feb 28, 2022
@ashutshkumr ashutshkumr moved this to In Progress in Open Traffic Generator Feb 28, 2022
@ashutshkumr ashutshkumr moved this from In Progress to Code Review in Open Traffic Generator Feb 28, 2022
Rangababu-R added a commit that referenced this issue Jun 7, 2022
Rangababu-R added a commit that referenced this issue Jul 26, 2022
@ashutshkumr ashutshkumr added bug Something isn't working and removed enhancement New feature or request labels Nov 11, 2022
@ashutshkumr ashutshkumr moved this to Initial Triage in OTG Tools Jan 13, 2023
@ashutshkumr ashutshkumr added this to the v1.0.0 milestone Jan 27, 2023
@ashutshkumr ashutshkumr moved this from Todo to Backlog in OTG Tools Jan 27, 2023
@ashutshkumr ashutshkumr added ux Impacts UX priority High Priority and removed bug Something isn't working py ux sdk gen labels Jul 18, 2023
@Vibaswan Vibaswan linked a pull request Sep 15, 2023 that will close this issue
@Vibaswan Vibaswan assigned Vibaswan and unassigned ashutshkumr Sep 15, 2023
@Vibaswan Vibaswan moved this from Backlog to In Progress in OTG Tools Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment