mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 10:15:47 +08:00
Fix error handling in GetSamlMeta()
This commit is contained in:
parent
150e3e30d5
commit
2ee4aebd96
@ -33,7 +33,13 @@ func (c *ApiController) GetSamlMeta() {
|
||||
c.ResponseError(fmt.Sprintf(c.T("saml:Application %s not found"), paramApp))
|
||||
return
|
||||
}
|
||||
metadata, _ := object.GetSamlMeta(application, host)
|
||||
|
||||
metadata, err := object.GetSamlMeta(application, host)
|
||||
if err != nil {
|
||||
c.ResponseError(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
c.Data["xml"] = metadata
|
||||
c.ServeXML()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user