fix: admin/plugins: too-long error when a plugin fails to start
Massimo Melina committed
May 24, 2024 at 16:05 UTC
cb9ff3b583bc68167ef19cc96a8e72ef8bdb1e76
1 file changed
+1
-2
src/api.plugins.ts
+1
-2
@@ -61,8 +61,7 @@ const apis: ApiHandlers = {
61
if (isPluginRunning(id))
62
return { msg: 'already running' }
63
await stopPlugin(id)
64
- await startPlugin(id)
65
- return {}
64
+ return startPlugin(id).then(() => 0, e => new ApiError(HTTP_SERVER_ERROR, e.message))
65
},
66
67
async stop_plugin({ id }) {