Skip to content

Commit

Permalink
Merge pull request #2280 from replicatedhq/divolgin/expired
Browse files Browse the repository at this point in the history
Show license expired error when sharing bundles
  • Loading branch information
divolgin committed Oct 29, 2021
2 parents 42e6ef4 + e7be9ac commit 93c195d
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 93c195d

Please sign in to comment.