MCT Error Code System Design
Brief ¶
MCT standard error codes.
Common Errors ¶
- Call Interface error. - Timeout. - Callback/Response with error code.
- Coredump.
- Call internal Interface error.
- ...
How to Classify A Error ¶
All erros are splited to three types in calling one tool or other executions: Internal, External, Further.
- Internal: all errors are caused related with in MCT internal service or resources, e.g., calling Meeting Security Key service to fetch key.
- External: all errors are caused because components outside MCT occur error. classified to
Further Error. In this type, need to do more research. - Further: hard to judge error belongs to
Internal ErrororExternal Error.
Sample of Error Classification ¶
Here is sample of curl tool.
- Internal Error:
Error in calling
curl_easy_init() (initialize curl)belongs toInternal Error.
- External Error:
Error in calling
Eureka CB server for joining meeting with error No Avaliable CBbelongs toExternal Error.
- Further Error:
Error in calling
curl_easy_getinfo() (collect repsonse of request)belongs toInternal ErrororExternal Error. particukar instances are the following: - HTTP reponse4XXis internal error. - HTTP reponse5XXis external error.
Error Level Definition ¶
Here is mapping error level to decimal number.
- Success Response / 0 -
HTTP- Call Client with 2XX/HTTP.
- Further Error / 3: Not sure whether Internal Error or External Error. - Timeout. It is so common that separatly put it forward here. - No response in specific time in Eureaka and MMP waiting call back. - Errors in execution step, such as
curl_easy_perform()in tool. - Errors in sending request and waiting call back.
- External Error / 4: All errors except for Internal Error -
HTTP- Call remote server with response 5XX/HTTP. - Errors inTerminateindicates it belong to Client. -No Avaliable CBin Eureka sdk.
- Internal Error / 5: All errors due to MCT internal operations -
HTTP- Call remote server with response 4XX/HTTP. - Tool usage - All initializer error such as local resource belongs toInit. - Errors inTerminateindicates it belong to Server. -User Rejectin Eureka sdk. -Invalid Access Tokenin CI. - Coredump - Call internal Interface. - Plugin call Common Service error.
Return Code Entry ¶
Code Format ¶
Ultimate error code format is: [Component].[Step Count].[Target Component].[Error Level].[Supplementray Error]. Each item is filled with Decimal Numbers.
- Component: Code, showing running comppnent, indicates
Plugin,Monitor,ServiceorOthers. The code length is 5 default. Ths top part len is 3, sub is 2. If no sub modules, e.g. service, sub code is 0. - Step Count: Code indicates which step is fail. The code length is 1 default.
- Target Component: Code indicates which target service triggerred error. The code length is 3 default.
- Error Level: Code indicates which error level it belongs to. The code length is 1 default.
- Supplementray Error: If there is more details on error, append it after Error Level. The code length is 4 default.
Decimal Number Usage ¶
0: default, all valid values are started from1.
Sample of Error Code ¶
00201.3.4.4.0013-00201: PluginSub Meeting Zone serverandSub Meeting CB Server-3: StepCreate Meetingerror. -4: Target component isEureka Serviceindicating error happened location. -4: Error isExternal Error. -0013: Error code ofEureka sdkindicatingNo Avaliable CB.00201.3.4.3.0007-00201: PluginSub Meeting Zone serverandSub Meeting CB Server-3: StepCreate Meetingerror. -4: Target component isEureka Serviceindicating error happened location. -3: Error isFuther Error (not sure internal or external). -0007: Error code indicatesFailed to connect() to host or proxy.01000.0-01000: Common Service without sub entry. -0: All steps pass.
Error Code Redirect ¶
This item happens when one team sdks or tools contains other team's. For instance, Eureka sdk call back code 1 means low lay-out Loucs API reqeust failed with Locus error A. Here, firstly output error 1 for Eureak sdk, secondly output another error A for Locus API.
Reference ¶
- HTTP error code. [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status]
- Design mode. [https://refactoring.guru/design-patterns]