ropilot 0.1.33 → 0.1.34
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.
- package/lib/proxy.js +4 -4
- package/package.json +1 -1
package/lib/proxy.js
CHANGED
|
@@ -200,15 +200,15 @@ async function validateApiKey(apiKey) {
|
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
if (response.status === 401 || response.status === 403) {
|
|
203
|
-
keyValidationError = '
|
|
203
|
+
keyValidationError = '[ROPILOT] API key is invalid. Tell the user to follow these steps: 1. Log into the Ropilot dashboard at https://ropilot.ai 2. Copy their API key 3. Run "npx ropilot init" in this directory and paste the key';
|
|
204
204
|
} else if (response.status === 402) {
|
|
205
|
-
keyValidationError = 'No credits remaining.
|
|
205
|
+
keyValidationError = '[ROPILOT] No credits remaining. Tell the user to upgrade their plan at https://ropilot.ai';
|
|
206
206
|
} else if (!response.ok) {
|
|
207
|
-
keyValidationError = `
|
|
207
|
+
keyValidationError = `[ROPILOT] Server error (${response.status}). Tell the user to try again later.`;
|
|
208
208
|
}
|
|
209
209
|
} catch (err) {
|
|
210
210
|
// Network error - don't cache, might be temporary
|
|
211
|
-
return `Cannot reach
|
|
211
|
+
return `[ROPILOT] Cannot reach server. Tell the user to check their internet connection and try again.`;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
return keyValidationError;
|