diff --git a/plugins/techdocs/src/client.test.ts b/plugins/techdocs/src/client.test.ts index 4cc7aca6a6..982c9496b2 100644 --- a/plugins/techdocs/src/client.test.ts +++ b/plugins/techdocs/src/client.test.ts @@ -242,8 +242,8 @@ describe('TechDocsStorageClient', () => { .instances[0] as jest.Mocked; instance.onerror({ - status: 500, - message: 'Some other error', + type: 'error', + data: 'Some other error', } as any); await expect(promise).rejects.toThrow(Error); diff --git a/plugins/techdocs/src/client.ts b/plugins/techdocs/src/client.ts index 29e6e018d0..afbf4b74a0 100644 --- a/plugins/techdocs/src/client.ts +++ b/plugins/techdocs/src/client.ts @@ -241,7 +241,7 @@ export class TechDocsStorageClient implements TechDocsStorageApi { // also handles the event-stream close. the reject is ignored if the Promise was already // resolved by a finish event. default: - reject(new Error(e.message)); + reject(new Error(e.data)); return; } };