fix panic
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1054af48]
goroutine 147 [running]:
code.vereign.com/code/key-storage-agent/handler.(\\*KeyStorageServerImpl).GetKey(0xc420256000, 0x1076f140, 0xc4209d84b0, 0xc4209da4a0, 0x0, 0x0, 0x0)
/srv/src/code.vereign.com/code/key-storage-agent/handler/handler.go:98 +0x428
code.vereign.com/code/key-storage-agent/vendor/code.vereign.com/code/viam-apis/key-storage-agent/api.\\_KeyStorage\\_GetKey\\_Handler.func1(0x1076f140, 0xc4209d84b0, 0x10646d20, 0xc4209da4a0, 0x105c3b20, 0xc4209dc320, 0x1076f140, 0xc4209d84b0)
/srv/src/code.vereign.com/code/key-storage-agent/vendor/code.vereign.com/code/viam-apis/key-storage-agent/api/api.pb.go:690 +0x84
code.vereign.com/code/key-storage-agent/server.unaryInterceptor(0x1076f140, 0xc4209d8450, 0x10646d20, 0xc4209da4a0, 0xc4209da4e0, 0xc4209da500, 0xc4209d83c0, 0x10602200, 0x10b58dc8, 0x106c12c0)
/srv/src/code.vereign.com/code/key-storage-agent/server/server.go:109 +0x230
code.vereign.com/code/key-storage-agent/vendor/code.vereign.com/code/viam-apis/key-storage-agent/api.\\_KeyStorage\\_GetKey\\_Handler(0x106839e0, 0xc420256000, 0x1076f140, 0xc4209d8450, 0xc4209de190, 0x10707368, 0x0, 0x0, 0xc4205cd110, 0x28)
/srv/src/code.vereign.com/code/key-storage-agent/vendor/code.vereign.com/code/viam-apis/key-storage-agent/api/api.pb.go:692 +0x160
code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc.(\\*Server).processUnaryRPC(0xc4204a8600, 0x10771a20, 0xc4204d7980, 0xc420b8a000, 0xc420724690, 0x10ae9320, 0x0, 0x0, 0x0)
/srv/src/code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc/server.go:971 +0x404
code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc.(\\*Server).handleStream(0xc4204a8600, 0x10771a20, 0xc4204d7980, 0xc420b8a000, 0x0)
/srv/src/code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc/server.go:1250 +0xc88
code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc.(\\*Server).serveStreams.func1.1(0xc4203420c0, 0xc4204a8600, 0x10771a20, 0xc4204d7980, 0xc420b8a000)
/srv/src/code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc/server.go:690 +0x90
created by code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc.(\\*Server).serveStreams.func1
/srv/src/code.vereign.com/code/key-storage-agent/vendor/google.golang.org/grpc/server.go:688 +0x90
Edited by Alexander Holodov