Sfoglia il codice sorgente

Updates error reading

Pugazhendhi 11 mesi fa
parent
commit
aed51a2bc5
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/api/providers/unbound.ts

+ 2 - 2
src/api/providers/unbound.ts

@@ -28,7 +28,7 @@ export class UnboundHandler implements ApiHandler {
 			const data = await response.json()
 			const data = await response.json()
 
 
 			if (!response.ok) {
 			if (!response.ok) {
-				throw new Error(data.error)
+				throw new Error(data.error.message)
 			}
 			}
 
 
 			yield {
 			yield {
@@ -42,7 +42,7 @@ export class UnboundHandler implements ApiHandler {
 			}
 			}
 		} catch (error) {
 		} catch (error) {
 			if (error instanceof Error) {
 			if (error instanceof Error) {
-				throw new Error(`Unbound Gateway completion error: ${error.message}`)
+				throw new Error(`Unbound Gateway completion error:\n ${error.message}`)
 			}
 			}
 			throw error
 			throw error
 		}
 		}