@clawchatsai/connector 0.0.6 → 0.0.7
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/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -453,7 +453,12 @@ async function handleSetup(token) {
|
|
|
453
453
|
else if (msg.type === 'setup-error') {
|
|
454
454
|
clearTimeout(timeout);
|
|
455
455
|
ws.close();
|
|
456
|
-
|
|
456
|
+
const reasons = {
|
|
457
|
+
'invalid_or_expired_token': 'Setup token is invalid or has expired. Generate a new one at clawchats.ai.',
|
|
458
|
+
'missing_fields': 'Setup failed: malformed token. Try copying the command again.',
|
|
459
|
+
};
|
|
460
|
+
const message = reasons[msg.reason] ?? `Setup failed: ${msg.reason}. Try again or visit clawchats.ai for support.`;
|
|
461
|
+
reject(new Error(message));
|
|
457
462
|
}
|
|
458
463
|
});
|
|
459
464
|
ws.on('error', (err) => {
|