@tthr/vue 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -134,7 +134,14 @@ export async function proxyToTetherApi(
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
const
|
|
137
|
+
const rawText = await response.text().catch(() => '');
|
|
138
|
+
let error: { error?: string } = { error: 'Unknown error' };
|
|
139
|
+
try {
|
|
140
|
+
error = JSON.parse(rawText);
|
|
141
|
+
} catch {
|
|
142
|
+
log.error(`Tether API returned non-JSON (HTTP ${response.status}): ${rawText.slice(0, 500)}`);
|
|
143
|
+
}
|
|
144
|
+
log.error(`Tether API error (HTTP ${response.status}) for ${endpoint}/${functionName}: ${error.error || rawText.slice(0, 200)}`);
|
|
138
145
|
throw createError({
|
|
139
146
|
statusCode: response.status,
|
|
140
147
|
message: error.error || `${endpoint === 'query' ? 'Query' : 'Mutation'} failed`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tthr/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Tether Vue/Nuxt SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@nuxt/kit": "^3.14.0",
|
|
37
|
-
"@tthr/
|
|
38
|
-
"@tthr/
|
|
37
|
+
"@tthr/client": "0.1.2",
|
|
38
|
+
"@tthr/server": "0.2.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "^5.7.2"
|