diff --git a/controllers/saml.go b/controllers/saml.go index 01f96276..8d7eeb26 100644 --- a/controllers/saml.go +++ b/controllers/saml.go @@ -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() }