Skip to content

Commit 976eece

Browse files
committed
fix: Handle unimplemented error
1 parent 6e71c4e commit 976eece

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plugin.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { StarbaseApp } from './handler'
22

3-
export class UnimplementedError extends Error {
3+
class UnimplementedError extends Error {
44
constructor(public method: string) {
55
super(`Method ${method} is not implemented`)
66
}
@@ -36,6 +36,10 @@ export class StarbasePluginRegistry {
3636
await plugin.register(this.app)
3737
console.log(`Plugin ${plugin.name} registered`)
3838
} catch (e) {
39+
if (e instanceof UnimplementedError) {
40+
return
41+
}
42+
3943
console.error(`Error registering plugin ${plugin.name}: ${e}`)
4044
throw e
4145
}

0 commit comments

Comments
 (0)