Skip to content

Commit 93f6b99

Browse files
authored
Propose Softer Logging on First Deploy (#89)
On first deploy, there were some weird error logs that didn't make much sense: # Before ``` $ export AGENT_URL=somestuff.com $ npx make-agent deploy -u $AGENT_URL OpenAPI specification is valid. [ERROR] Failed to update plugin: {"error":"Plugin not found. Please register the plugin first."} Attempting to register plugin... Plugin registered successfully $ npx make-agent deploy -u $AGENT_URL OpenAPI specification is valid. Plugin updated successfully. ``` # After Logs should look like ``` OpenAPI specification is valid. [WARN] Plugin with ID ${pluginId} not found/registered. Attempting to register plugin... Plugin registered successfully ```
1 parent a822cf7 commit 93f6b99

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/services/plugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ export class PluginService {
4949
});
5050

5151
if (!response.ok) {
52-
console.error(`Failed to update plugin: ${await response.text()}`);
52+
const responseText = await response.text();
53+
if (responseText.includes("Plugin not found")) {
54+
console.warn(`Plugin with ID ${pluginId} not found/registered.`);
55+
} else {
56+
console.error("Failed to update plugin", responseText);
57+
}
5358
return null;
5459
}
5560

0 commit comments

Comments
 (0)