A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(connector): return error page when error occur
LinkinStars20ac2b6c5829
diff --git a/internal/controller/connector_controller.go b/internal/controller/connector_controller.goindex a4ba035b..f3bfdc5a 100644--- a/internal/controller/connector_controller.go+++ b/internal/controller/connector_controller.go@@ -129,6 +129,10 @@ func (cc *ConnectorController) ConnectorRedirect(connector plugin.Connector) (fnctx.Redirect(http.StatusFound, "/50x")return}+ if len(resp.ErrMsg) > 0 {+ ctx.Redirect(http.StatusFound, fmt.Sprintf("/50x?title=%s&msg=%s", resp.ErrTitle, resp.ErrMsg))+ return+ }if len(resp.AccessToken) > 0 {ctx.Redirect(http.StatusFound, fmt.Sprintf("%s/users/auth-landing?access_token=%s",siteGeneral.SiteUrl, resp.AccessToken))