-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
In current wechaty-puppet-service code, we throw an Error when receiving unknown grpc event:
puppet-service/src/client/puppet-service.ts
Line 356 in cbd2bc8
throw new Error('eventType ' + type + ' unsupported! (code should not reach here)') |
This error won't be caught by error listener and will break the system. If the bot has registered unhandled error listener on process, the puppet-service event listener will break and no futher events can be processed, which will result in system reset by watch dog. If there is no unhadled error lisener registered, the process will exit directly.
Thus we should change it by logging the error, or emit an error event. Since there might be new events in new versions of puppet and this will break the system for people using older versions.
Metadata
Metadata
Assignees
Labels
No labels