Config: 404 for status of deleted device (#31031)
This commit is contained in:
parent
eed0649eaa
commit
206475271c
2 changed files with 8 additions and 2 deletions
|
|
@ -272,6 +272,10 @@ func deviceStatusHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
if errors.Is(err, config.ErrNotFound) {
|
||||
jsonError(w, http.StatusNotFound, err)
|
||||
return
|
||||
}
|
||||
jsonError(w, http.StatusBadRequest, err)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue