diff --git a/src/Frontend/src/components/messages/BodyView.vue b/src/Frontend/src/components/messages/BodyView.vue
index 62222c599..ceb1e8d8b 100644
--- a/src/Frontend/src/components/messages/BodyView.vue
+++ b/src/Frontend/src/components/messages/BodyView.vue
@@ -25,6 +25,10 @@ const body = computed(() => bodyState.value.data.value);
Could not find the message body. This could be because the message URL is invalid or the corresponding message was processed and is no longer tracked by ServiceControl.
Message body unavailable.
+
Message body cannot be displayed because content type "{{ bodyState.data.content_type }}" is not supported.
diff --git a/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue b/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue
index 811b4392a..4124fe83f 100644
--- a/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue
+++ b/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue
@@ -30,7 +30,7 @@ const body = computed(() => props.messageData.body.data.value || "");
Failed to load message data, there might be a connection issue or the message may no longer be available.
-
+
No message body data available
diff --git a/src/Frontend/src/stores/MessageStore.ts b/src/Frontend/src/stores/MessageStore.ts
index c3d1ee19d..a746ffd10 100644
--- a/src/Frontend/src/stores/MessageStore.ts
+++ b/src/Frontend/src/stores/MessageStore.ts
@@ -61,7 +61,7 @@ interface Model {
export const useMessageStore = defineStore("MessageStore", () => {
const headers = ref>({ data: [] });
- const body = ref>({ data: {} });
+ const body = ref>({ data: {} });
const state = reactive>({ data: { failure_metadata: {}, failure_status: {}, dialog_status: {}, invoked_saga: {} } });
let bodyLoadedId = "";
let conversationLoadedId = "";
@@ -204,6 +204,12 @@ export const useMessageStore = defineStore("MessageStore", () => {
return;
}
+ if (response.status === 204) {
+ body.value.data.no_content = true;
+
+ return;
+ }
+
const contentType = response.headers.get("content-type");
body.value.data.content_type = contentType ?? "text/plain";
body.value.data.value = await response.text();
@@ -288,7 +294,7 @@ export const useMessageStore = defineStore("MessageStore", () => {
await downloadBody();
- if (!(body.value.not_found || body.value.failed_to_load)) {
+ if (!(body.value.not_found || body.value.failed_to_load || body.value.data.no_content)) {
exportString += "\n\nMESSAGE BODY\n";
exportString += body.value.data.value;
}
diff --git a/src/Frontend/src/stores/SagaDiagramStore.ts b/src/Frontend/src/stores/SagaDiagramStore.ts
index bbd06884b..cbea7e1da 100644
--- a/src/Frontend/src/stores/SagaDiagramStore.ts
+++ b/src/Frontend/src/stores/SagaDiagramStore.ts
@@ -10,7 +10,7 @@ import { useMessageStore } from "./MessageStore";
export interface SagaMessageData {
message_id: string;
- body: DataContainer<{ value?: string; content_type?: string }>;
+ body: DataContainer<{ value?: string; content_type?: string; no_content?: boolean }>;
}
export const useSagaDiagramStore = defineStore("SagaDiagramStore", () => {
const sagaHistory = ref(null);
@@ -101,6 +101,11 @@ export const useSagaDiagramStore = defineStore("SagaDiagramStore", () => {
return result;
}
+ if (response.status === 204) {
+ result.body.data.no_content = true;
+ return result;
+ }
+
const contentType = response.headers.get("content-type");
result.body.data.content_type = contentType ?? "text/plain";
result.body.data.value = await response.text();