Replies: 3 comments 1 reply
-
I just created this doc, should be what you need.
https://github.com/freeconf/restconf/wiki/Advanced#returning-401-409-and-400-class-errors
…On Tue, Dec 20, 2022 at 5:55 PM Patrick Dumais ***@***.***> wrote:
Could we get an example of error reporting with restconf? For example,
within onAction, if we'd like to return a 401 with a payload as defined in
section 7.1 of rfc8040 ?
—
Reply to this email directly, view it on GitHub
<#16>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACA7WJEFVGTVLN5UMTWBTWOI2P3ANCNFSM6AAAAAATFACD6U>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
oops, Freeconf/Restconf currently doesn't set that payload beyond plain
text response of the error message text and the HTTP status code. This
would have to be added, BUT it wouldn't be that hard at all. Can you
create an issue and pointers to the spec?
…On Tue, Dec 20, 2022 at 6:00 PM Patrick Dumais ***@***.***> wrote:
Thanks. So would restconf take care of filling put thw payload such as
`HTTP/1.1 409 Conflict
Date: Thu, 26 Jan 2017 20:56:30 GMT
Server: example-server
Content-Type: application/yang-data+json
{
"ietf-restconf:errors" : {
"error" : [
{
"error-type" : "protocol",
"error-tag" : "lock-denied",
"error-message" : "Lock failed; lock already held"
}
]
}
}`
? Or would we need to set the raw json to do this?
—
Reply to this email directly, view it on GitHub
<#16 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACA7VDB7QFLIQW4YJBXLLWOI3CRANCNFSM6AAAAAATFACD6U>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks. I created #17 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could we get an example of error reporting with restconf? For example, within onAction, if we'd like to return a 401 with a payload as defined in section 7.1 of rfc8040 ?
Beta Was this translation helpful? Give feedback.
All reactions