diff --git a/client/src/api/datasets.ts b/client/src/api/datasets.ts index 6640d136854..8219498194b 100644 --- a/client/src/api/datasets.ts +++ b/client/src/api/datasets.ts @@ -55,7 +55,7 @@ export async function loadDatasets(options: LoadDatasetsOptions): Promise { - const { data, error } = await GalaxyApi().GET("/api/datasets/{dataset_id}/get_content_as_text", { + const { data, error, response } = await GalaxyApi().GET("/api/datasets/{dataset_id}/get_content_as_text", { params: { path: { dataset_id: params.id, @@ -64,7 +64,7 @@ export async function fetchDatasetTextContentDetails(params: { id: string }): Pr }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } diff --git a/client/src/stores/collectionAttributesStore.ts b/client/src/stores/collectionAttributesStore.ts index e3ba4631bfb..360468de084 100644 --- a/client/src/stores/collectionAttributesStore.ts +++ b/client/src/stores/collectionAttributesStore.ts @@ -2,15 +2,15 @@ import { defineStore } from "pinia"; import { type DatasetCollectionAttributes, GalaxyApi } from "@/api"; import { type FetchParams, useKeyedCache } from "@/composables/keyedCache"; -import { rethrowSimple } from "@/utils/simple-error"; +import { rethrowSimpleWithStatus } from "@/utils/simple-error"; export const useCollectionAttributesStore = defineStore("collectionAttributesStore", () => { async function fetchAttributes(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/dataset_collections/{hdca_id}/attributes", { + const { data, error, response } = await GalaxyApi().GET("/api/dataset_collections/{hdca_id}/attributes", { params: { path: { hdca_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } diff --git a/client/src/stores/datasetExtraFilesStore.ts b/client/src/stores/datasetExtraFilesStore.ts index 4e3c796784c..15783136904 100644 --- a/client/src/stores/datasetExtraFilesStore.ts +++ b/client/src/stores/datasetExtraFilesStore.ts @@ -3,15 +3,15 @@ import { defineStore } from "pinia"; import { GalaxyApi } from "@/api"; import type { DatasetExtraFiles } from "@/api/datasets"; import { type FetchParams, useKeyedCache } from "@/composables/keyedCache"; -import { rethrowSimple } from "@/utils/simple-error"; +import { rethrowSimpleWithStatus } from "@/utils/simple-error"; export const useDatasetExtraFilesStore = defineStore("datasetExtraFilesStore", () => { async function fetchDatasetExtraFiles(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/datasets/{dataset_id}/extra_files", { + const { data, error, response } = await GalaxyApi().GET("/api/datasets/{dataset_id}/extra_files", { params: { path: { dataset_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } diff --git a/client/src/stores/invocationStore.ts b/client/src/stores/invocationStore.ts index 644570ecfc2..a96773b6f7d 100644 --- a/client/src/stores/invocationStore.ts +++ b/client/src/stores/invocationStore.ts @@ -10,53 +10,53 @@ import type { WorkflowInvocationRequest, } from "@/api/invocations"; import { type FetchParams, useKeyedCache } from "@/composables/keyedCache"; -import { rethrowSimple } from "@/utils/simple-error"; +import { rethrowSimple, rethrowSimpleWithStatus } from "@/utils/simple-error"; export const useInvocationStore = defineStore("invocationStore", () => { const scrollListScrollTop = ref(0); async function fetchInvocationDetails(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/invocations/{invocation_id}", { + const { data, error, response } = await GalaxyApi().GET("/api/invocations/{invocation_id}", { params: { path: { invocation_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } async function fetchInvocationJobsSummary(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/invocations/{invocation_id}/jobs_summary", { + const { data, error, response } = await GalaxyApi().GET("/api/invocations/{invocation_id}/jobs_summary", { params: { path: { invocation_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } async function fetchInvocationStepJobsSummary(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/invocations/{invocation_id}/step_jobs_summary", { + const { data, error, response } = await GalaxyApi().GET("/api/invocations/{invocation_id}/step_jobs_summary", { params: { path: { invocation_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } async function fetchInvocationStep(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/invocations/steps/{step_id}", { + const { data, error, response } = await GalaxyApi().GET("/api/invocations/steps/{step_id}", { params: { path: { step_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } async function fetchInvocationRequest(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/invocations/{invocation_id}/request", { + const { data, error, response } = await GalaxyApi().GET("/api/invocations/{invocation_id}/request", { params: { path: { invocation_id: params.id, @@ -64,17 +64,17 @@ export const useInvocationStore = defineStore("invocationStore", () => { }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } async function fetchInvocationCount(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/workflows/{workflow_id}/counts", { + const { data, error, response } = await GalaxyApi().GET("/api/workflows/{workflow_id}/counts", { params: { path: { workflow_id: params.id } }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } let allCounts = 0; diff --git a/client/src/stores/jobDestinationParametersStore.ts b/client/src/stores/jobDestinationParametersStore.ts index a002671182a..32485054ebd 100644 --- a/client/src/stores/jobDestinationParametersStore.ts +++ b/client/src/stores/jobDestinationParametersStore.ts @@ -3,17 +3,17 @@ import { defineStore } from "pinia"; import { GalaxyApi } from "@/api"; import type { JobDestinationParams } from "@/api/jobs"; import { type FetchParams, useKeyedCache } from "@/composables/keyedCache"; -import { rethrowSimple } from "@/utils/simple-error"; +import { rethrowSimpleWithStatus } from "@/utils/simple-error"; export const useJobDestinationParametersStore = defineStore("jobDestinationParametersStore", () => { async function fetchJobDestinationParams(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/jobs/{job_id}/destination_params", { + const { data, error, response } = await GalaxyApi().GET("/api/jobs/{job_id}/destination_params", { params: { path: { job_id: params.id }, }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; } diff --git a/client/src/stores/jobStore.ts b/client/src/stores/jobStore.ts index 3eb75d04aac..c1c4c930bb9 100644 --- a/client/src/stores/jobStore.ts +++ b/client/src/stores/jobStore.ts @@ -9,18 +9,18 @@ import { ref } from "vue"; import { GalaxyApi } from "@/api"; import { type ResponseVal, type ShowFullJobResponse, TERMINAL_STATES } from "@/api/jobs"; import { type FetchParams, useKeyedCache } from "@/composables/keyedCache"; -import { rethrowSimple } from "@/utils/simple-error"; +import { rethrowSimpleWithStatus } from "@/utils/simple-error"; export const useJobStore = defineStore("jobStore", () => { const latestResponse = ref(null); async function fetchJobById(params: FetchParams): Promise { - const { data, error } = await GalaxyApi().GET("/api/jobs/{job_id}", { + const { data, error, response } = await GalaxyApi().GET("/api/jobs/{job_id}", { params: { path: { job_id: params.id } }, query: { full: true }, }); if (error) { - rethrowSimple(error); + rethrowSimpleWithStatus(error, response); } return data; }