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

Examples should allow error results #363

Open
BelfordZ opened this issue Aug 2, 2022 · 5 comments
Open

Examples should allow error results #363

BelfordZ opened this issue Aug 2, 2022 · 5 comments
Labels
good first issue Good for newcomers

Comments

@BelfordZ
Copy link
Member

BelfordZ commented Aug 2, 2022

This would also make automated testing tools able to test against failing cases.

@BelfordZ BelfordZ added the good first issue Good for newcomers label Apr 24, 2024
@BelfordZ
Copy link
Member Author

Since all result & param reference ExampleObjects, and example objects aren't really structured to be examples of errors, im wondering what the value for examplePairings.error should be?

@BelfordZ
Copy link
Member Author

Should you be able to ref an ErrorObject? ie:

{
  "name": "examplepair",
  "params": [...],
  "error": { "$ref": "components/errors/bigbad" }
}

@BelfordZ
Copy link
Member Author

BelfordZ commented Apr 24, 2024

Should it be the same as the others, use ExampleObject.value and provide the whole error object?

{
  "name": "examplepair",
  "params": [...],
  "error": { 
    "name": "big bad example", 
    "value": {
      "code": 404, 
      "message": "dog ate homework", 
      "data": {}
     }
   }
}

@BelfordZ
Copy link
Member Author

either?

@shanejonas
Copy link
Member

hm maybe value itself should be the raw error or a ref?

BelfordZ added a commit that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants