opencode-anthropic-auth 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/index.mjs +3 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -110,7 +110,9 @@ export async function AnthropicAuthPlugin({ client }) {
110
110
  }),
111
111
  },
112
112
  );
113
- if (!response.ok) return;
113
+ if (!response.ok) {
114
+ throw new Error(`Token refresh failed: ${response.status}`);
115
+ }
114
116
  const json = await response.json();
115
117
  await client.auth.set({
116
118
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-anthropic-auth",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "./index.mjs",
5
5
  "devDependencies": {
6
6
  "@opencode-ai/plugin": "^0.4.45"