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

confusing error message about "x_ values" #1016

Closed
ElectricNroff opened this issue Feb 9, 2023 · 0 comments · Fixed by #1031
Closed

confusing error message about "x_ values" #1016

ElectricNroff opened this issue Feb 9, 2023 · 0 comments · Fixed by #1031
Assignees

Comments

@ElectricNroff
Copy link
Contributor

When using the "POST /cve/:id/cna" endpoint with a file that begins with:

{"cnaContainer": {
        "x_a": {"$b": "c"},
        "x_exploit_price": "$5000.00",

the error message is:

A problem occurred while saving the CVE Record, ensure that x_ values do not start with $

Here, $5000.00 is a value, and it is allowed to begin with a $ character. The only problem is that a name - $b in this example - is not allowed to begin with a $ character.

The error message could be reworded to something like:

A problem occurred while saving the CVE Record; ensure that field names within x_ data structures do not start with $

Optionally, the word field could be omitted, because it is not used in the JSON documentation:

https://www.rfc-editor.org/rfc/rfc8259

    An object structure is represented as a pair of curly brackets
   surrounding zero or more name/value pairs (or members).  A name is a
   string.  A single colon comes after each name, separating the name
   from the value.
@jdaigneau5 jdaigneau5 self-assigned this Feb 16, 2023
brettp added a commit that referenced this issue Feb 17, 2023
Resolves #1016 Clarified unableToStoreCveRecord error message
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

Successfully merging a pull request may close this issue.

2 participants