From c0679de57b71a346d5adcec792cd031a08b6e321 Mon Sep 17 00:00:00 2001 From: Jersey Date: Thu, 22 Aug 2024 21:09:08 -0400 Subject: [PATCH] 0.0.3 - actually fix the error --- packages/rvapi/deno.json | 2 +- packages/rvapi/src/media/services.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rvapi/deno.json b/packages/rvapi/deno.json index a683d07..e0e7799 100644 --- a/packages/rvapi/deno.json +++ b/packages/rvapi/deno.json @@ -1,6 +1,6 @@ { "name": "@jersey/rvapi", - "version": "0.0.2", + "version": "0.0.3", "exports": "./src/mod.ts", "imports": { "@denosaurs/event": "jsr:@denosaurs/event@^2.0.2", diff --git a/packages/rvapi/src/media/services.ts b/packages/rvapi/src/media/services.ts index 46e23f6..3f94577 100644 --- a/packages/rvapi/src/media/services.ts +++ b/packages/rvapi/src/media/services.ts @@ -109,7 +109,7 @@ export class MediaServices { const data = await resp.json(); if (!resp.ok || data.type) { - throw new Error('upload file', { cause: resp }); + throw new MediaError('upload file', data.type); } return data.id;