@sprucelabs/sprucebot-llm 11.3.0 → 11.3.1
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.
|
@@ -14,10 +14,14 @@ class SpruceError extends error_1.default {
|
|
|
14
14
|
message = `You must create a bot and set it using 'SprucebotLlmFactory.setInstance(bot)' before you can get an instance of it.`;
|
|
15
15
|
break;
|
|
16
16
|
case 'INVALID_CALLBACK':
|
|
17
|
-
message = `The callback you tried to invoke (${options.matchedCallback}) is not valid.
|
|
17
|
+
message = `The callback you tried to invoke (${options.matchedCallback}) is not valid. Make sure you have the syntax correct and are calling a valid callback:\n${options.validCallbacks.map((name, idx) => `${idx + 1}: ${name}`).join('\n')}`;
|
|
18
18
|
break;
|
|
19
19
|
case 'CALLBACK_ERROR':
|
|
20
|
-
message =
|
|
20
|
+
message =
|
|
21
|
+
'The callback threw an error! Please check the details and try again.';
|
|
22
|
+
if (options.originalError) {
|
|
23
|
+
message += `\n\nOriginal Error: ${options.originalError.message}`;
|
|
24
|
+
}
|
|
21
25
|
break;
|
|
22
26
|
default:
|
|
23
27
|
message = super.friendlyMessage();
|
|
@@ -9,10 +9,14 @@ export default class SpruceError extends BaseSpruceError {
|
|
|
9
9
|
message = `You must create a bot and set it using 'SprucebotLlmFactory.setInstance(bot)' before you can get an instance of it.`;
|
|
10
10
|
break;
|
|
11
11
|
case 'INVALID_CALLBACK':
|
|
12
|
-
message = `The callback you tried to invoke (${options.matchedCallback}) is not valid.
|
|
12
|
+
message = `The callback you tried to invoke (${options.matchedCallback}) is not valid. Make sure you have the syntax correct and are calling a valid callback:\n${options.validCallbacks.map((name, idx) => `${idx + 1}: ${name}`).join('\n')}`;
|
|
13
13
|
break;
|
|
14
14
|
case 'CALLBACK_ERROR':
|
|
15
|
-
message =
|
|
15
|
+
message =
|
|
16
|
+
'The callback threw an error! Please check the details and try again.';
|
|
17
|
+
if (options.originalError) {
|
|
18
|
+
message += `\n\nOriginal Error: ${options.originalError.message}`;
|
|
19
|
+
}
|
|
16
20
|
break;
|
|
17
21
|
default:
|
|
18
22
|
message = super.friendlyMessage();
|