[go: nahoru, domu]

Page MenuHomePhabricator

🚫 Replace `invalid-language-code` errors with generic `invalid-value` error
Closed, InvalidPublic

Description

The new error should follow this format:

"code": "invalid-value",
"message": "Invalid value at '{json-pointer}'",
"context": { 
  "path": "{json-pointer}"
}

Note: remember to check if the OAS needs updating as well.

Event Timeline

Invalid language codes in the request body aren't values, they're the keys in labels/descriptions/aliases. The message would say "Invalid value at '/item/labels/bad-language-code'" which doesn't fit.