mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Do not warn when an AS room alias does not exist
This commit is contained in:
parent
df432beeb4
commit
e0f1e2a033
|
|
@ -86,19 +86,22 @@ func (a *AppServiceQueryAPI) RoomAliasExists(
|
||||||
log.WithError(err).Errorf("Issue querying room alias on application service %s", appservice.ID)
|
log.WithError(err).Errorf("Issue querying room alias on application service %s", appservice.ID)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if resp.StatusCode == http.StatusOK {
|
switch resp.StatusCode {
|
||||||
// StatusOK received from appservice. Room exists
|
case http.StatusOK:
|
||||||
|
// OK received from appservice. Room exists
|
||||||
response.AliasExists = true
|
response.AliasExists = true
|
||||||
return nil
|
return nil
|
||||||
}
|
case http.StatusNotFound:
|
||||||
|
// Room does not exist
|
||||||
// Log non OK
|
default:
|
||||||
|
// Application service reported an error. Warn
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"appservice_id": appservice.ID,
|
"appservice_id": appservice.ID,
|
||||||
"status_code": resp.StatusCode,
|
"status_code": resp.StatusCode,
|
||||||
}).Warn("Application service responded with non-OK status code")
|
}).Warn("Application service responded with non-OK status code")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
response.AliasExists = false
|
response.AliasExists = false
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue