tokers commented on a change in pull request #1705:
URL: https://github.com/apache/apisix-dashboard/pull/1705#discussion_r606948023



##########
File path: api/cmd/managerapi.go
##########
@@ -99,7 +108,9 @@ func NewManagerAPICommand() *cobra.Command {
                        }
                        if err := store.InitStores(); err != nil {
                                log.Errorf("init stores fail: %w", err)
-                               panic(err)
+                               fmt.Printf("%s\n", err)

Review comment:
       We should output exceptions to stderr, not stdout.

##########
File path: api/internal/core/store/store.go
##########
@@ -105,6 +105,7 @@ func (s *GenericStore) Init() error {
                key := ret[i].Key[len(s.opt.BasePath)+1:]
                objPtr, err := s.StringToObjPtr(ret[i].Value, key)
                if err != nil {
+                       fmt.Println("Error occurred while initializing logical 
store: ", s.opt.BasePath)

Review comment:
       Ditto.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to