Skip to content

Commit

Permalink
Show license expired error when sharing bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Oct 29, 2021
1 parent 42e6ef4 commit e7be9ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/handlers/troubleshoot.go
Expand Up @@ -401,7 +401,7 @@ func (h *Handler) ShareSupportBundle(w http.ResponseWriter, r *http.Request) {
} else {
logger.Errorf("Failed to share support bundle: %d", resp.StatusCode)
}
JSON(w, http.StatusInternalServerError, nil)
JSON(w, http.StatusInternalServerError, string(body))
return
}

Expand Down
7 changes: 6 additions & 1 deletion web/src/components/troubleshoot/SupportBundleAnalysis.jsx
Expand Up @@ -45,7 +45,12 @@ export class SupportBundleAnalysis extends React.Component {
})
.then(async (result) => {
if (!result.ok) {
this.setState({ sendingBundle: false, sendingBundleErrMsg: `Unable to send bundle to vendor: Status ${result.status}, please try again.` });
const text = await result.text();
let msg = `Unable to send bundle to vendor: Status ${result.status}, please try again.`;
if (text) {
msg = `Unable to send bundle to vendor: ${text}`;
}
this.setState({ sendingBundle: false, sendingBundleErrMsg: msg });
return;
}
await this.getSupportBundle();
Expand Down

0 comments on commit e7be9ac

Please sign in to comment.