-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add error reporting as per section 7.1 from RFC-8040 #17
Comments
I presume spec is here |
Hi @dhubler, I see that the response body is well formatted:
But the response code is always 200 OK and it should be 401.
Is it the right way to return an error:
|
It should be a 401 and it does look like you are wrapping the error correctly. If you are sure you have haven't added more error wrapping beyond the above and running the latest code then there might be an issue. BTW: The related code is here: |
When returning an error with
// Option #2 - enhanced but still an 401 error return fmt.Errorf("Bad ACL %w", fc.UnauthorizedError)
It would be useful if restconf could create a payload according to the model of ietf-restconf:errors
The text was updated successfully, but these errors were encountered: