Commit 8ffa4d48 authored by davelopez's avatar davelopez
Browse files

Display response error message if job fails

To make the real error more obvious:
- If there is an err_msg in the response, it is displayed in `danger` alert style
- The fixed message indicating the request cannot be completed and pointing to the submitted data appears now in `warning` alert style
parent 27f9fcc7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -16,7 +16,10 @@
                    />
                    <Webhook v-if="showSuccess" type="tool" :tool-id="jobDef.tool_id" />
                    <b-modal v-model="showError" size="sm" :title="errorTitle | l" scrollable ok-only>
                        <b-alert show variant="danger">
                        <b-alert v-if="errorMessage" show variant="danger">
                            {{ errorMessage }}
                        </b-alert>
                        <b-alert show variant="warning">
                            The server could not complete this request. Please verify your parameter settings, retry
                            submission and contact the Galaxy Team if this error persists. A transcript of the submitted
                            data is shown below.
@@ -155,6 +158,7 @@ export default {
            remapAllowed: false,
            errorTitle: null,
            errorContent: null,
            errorMessage: "",
            messageShow: false,
            messageVariant: "",
            messageText: "",
@@ -324,6 +328,7 @@ export default {
                    document.querySelector(".center-panel").scrollTop = 0;
                },
                (e) => {
                    this.errorMessage = e?.response?.data?.err_msg;
                    this.showExecuting = false;
                    let genericError = true;
                    const errorData = e && e.response && e.response.data && e.response.data.err_data;