Merge branch 'develop' of ssh://github.com/alice-lg/alice-lg into develop

This commit is contained in:
Annika Hannig 2023-05-15 14:57:04 +02:00
commit 3d588023b0
2 changed files with 8 additions and 5 deletions

View File

@ -62,6 +62,7 @@ func (s *Server) apiRouteServerStatusShow(
result, err := source.Status(ctx)
if err != nil {
s.logSourceError("status", rsID, err)
return nil, err
}
if result != nil {
result.Meta.Version = config.Version

View File

@ -33,15 +33,17 @@ const Status = ({routeServerId}) => {
});
}, [routeServerId, handleError]);
if (error && error.code >= 100 && error.code < 200) {
const errorInfo = error?.response?.data;
if (errorInfo && errorInfo.tag === "CONNECTION_REFUSED") {
return (
<div className="routeserver-status">
<div className="api-error">
unreachable
route server unreachable
</div>
</div>
);
} else if (error?.response?.data?.tag === "GENERIC_ERROR") {
} else if (errorInfo && errorInfo.tag === "GENERIC_ERROR") {
return (
<div className="routeserver-status">
<div className="api-error">
@ -49,11 +51,11 @@ const Status = ({routeServerId}) => {
</div>
</div>
);
} else if (error) {
} else if (errorInfo) {
return (
<div className="routeserver-status">
<div className="api-error">
{error.response?.data?.tag}
{errorInfo.tag}
</div>
</div>
);