Config UI: allow creating and saving devices with setup errors (#24091)

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
andig 2025-10-07 14:31:09 +02:00 • committed by GitHub
parent 27b2edfb39
commit aef95ce425
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 204 additions and 90 deletions

View file

@ -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 (