mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +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))
|
c.ResponseError(fmt.Sprintf(c.T("saml:Application %s not found"), paramApp))
|
||||||
return
|
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.Data["xml"] = metadata
|
||||||
c.ServeXML()
|
c.ServeXML()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user