mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 10:38:20 +00:00
add data to jsonrpc error response
This commit is contained in:
parent
ec0d62e32e
commit
0a51ba0beb
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ const (
|
|||
type respError struct {
|
||||
Code ErrorCode `json:"code"`
|
||||
Message string `json:"message"`
|
||||
// cannot be omitempty because of frontend library
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
func respondError(w io.Writer, id any, code ErrorCode, err error) error {
|
||||
|
|
Loading…
Add table
Reference in a new issue