Skip to content

Commit e648c38

Browse files
committed
Graceful handling of operator-registry process MIA
1 parent cde4e0f commit e648c38

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "staking-rewards-controller",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "",
55
"contributors": [
66
"ANYONE Protocol Labs",

src/operator-registry/operator-registry.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export class OperatorRegistryService {
3838
processId: this.operatorRegistryProcessId,
3939
tags: [{ name: 'Action', value: 'View-State' }],
4040
})
41+
if (result.Error) {
42+
this.logger.error(`Failed fetching operator registry state: ${result.Error}`)
43+
return {} as OperatorRegistryState
44+
}
4145
const state = JSON.parse(result.Messages[0].Data)
4246

4347
for (const prop in state) {

0 commit comments

Comments
 (0)