Config UI: allow creating and saving devices with setup errors (#24091)
Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
parent
27b2edfb39
commit
aef95ce425
14 changed files with 204 additions and 90 deletions
|
|
@ -91,10 +91,12 @@ func jsonError(w http.ResponseWriter, status int, err error) {
|
|||
w.WriteHeader(status)
|
||||
|
||||
res := struct {
|
||||
Error string `json:"error"`
|
||||
Line int `json:"line,omitempty"`
|
||||
Error string `json:"error"`
|
||||
Line int `json:"line,omitempty"`
|
||||
IsAuthError bool `json:"isAuthError,omitempty"`
|
||||
}{
|
||||
Error: err.Error(),
|
||||
Error: err.Error(),
|
||||
IsAuthError: errors.Is(err, api.ErrLoginRequired) || errors.Is(err, api.ErrMissingToken),
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue