Aleksandr created IGNITE-26072:
----------------------------------

             Summary: Use ErrorCodes in CLI error handling
                 Key: IGNITE-26072
                 URL: https://issues.apache.org/jira/browse/IGNITE-26072
             Project: Ignite
          Issue Type: Improvement
          Components: cli, rest
            Reporter: Aleksandr


We have {{org.apache.ignite.lang.ErrorGroups}} that declares unique error 
groups and codes for each public exception. This is a wonderful mechanism that 
is not used in CLI and REST unfortunately. 

For REST: add errorCode to Problem.code in every handler. 

For CLI: define an ErrorCode-based handler that will delegate handling to 
sub-handlers by ErrorGroup and then by ErrorCode. This should look like: 

1. If there is a specific errorcode handler, use it
2. If there is a specific errorgoup handler, use it
3. If there is no handlers, use generic one. 

Integrate this approach into every handler/Call in CLI. Might be a separate 
ticket.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to