Overview
UModel high-level APIs use a layered, structured error handling system that supports response status management, retry policies, and clear error messages.
System architecture
Response status hierarchy
Execution result status
|
Status |
Description |
Priority |
|
|
The execution was successful. |
0 |
|
|
The execution was partially successful. |
1 |
|
|
The execution failed. |
2 |
Error levels
|
Level |
Description |
Priority |
|
|
An informational message. |
0 |
|
|
A warning message. |
1 |
|
|
An error message. |
2 |
Retry policies
|
Policy |
Description |
|
|
Do not retry the operation. |
|
|
Retry the operation one time. |
|
|
The operation can be retried until it succeeds. |
Error code categories
Error codes are categorized into three groups based on the processing stage:
-
Common: General errors related to request processing and UModel.
-
Phase1: Stage-one errors related to data sources, storage, and Prometheus Query Language (PromQL).
-
Phase2: Stage-two errors related to entity processing and method calls.
Common error codes
Basic request processing errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Request data format error |
Check the request data structure and ensure all required fields are provided. |
|
|
400 |
None |
Error |
Conversion failed: xxxx |
Check the SPL syntax for compatibility with the target system. |
|
|
400 |
None |
Error |
Missing required parameters: xxxx |
Provide all required parameters as specified in the API documentation. |
|
|
400 |
None |
Error |
Invalid parameters: xxxx |
Check the parameters against the API documentation to ensure they are valid. |
|
|
400 |
None |
Error |
Unsupported operation: xxxx |
Use a supported operation. Refer to the API documentation for details. |
UModel-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Invalid UModel data |
Check the UModel data format to ensure it is valid JSON. |
|
|
200 |
None |
Warn |
Partial invalid UModel data, error: xxxx |
Check the UModel data format to ensure it is valid JSON. |
|
|
404 |
Continuous |
Error |
UModel data is empty, need to re-obtain |
Reload the UModel configuration or check if the UModel service is available. |
|
|
400 |
Once |
Error |
UModel information not found: xxxx |
Ensure the UModel configuration exists and is loaded correctly. |
Validation and processing errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Validation failed: xxxx |
Check the data against the validation rules. |
|
|
400 |
Once |
Error |
Failed to extract parameters: xxxx |
Ensure the parameter format is correct and accessible. |
|
|
500 |
None |
Error |
Internal error occurred in umode paas |
Contact your system administrator. |
Phase1 error codes
Data source-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Unsupported data source type |
Use a supported data source type, such as |
|
|
400 |
None |
Error |
Unsupported source type: xxxx |
Use a supported source type, such as |
|
|
400 |
None |
Error |
Unsupported query type: xxxx in MetricSet |
Check the UModel documentation to ensure the query type is supported in MetricSet. Valid query types are |
|
|
400 |
None |
Error |
Unsupported dataset type: xxxx |
Use a supported dataset type, such as |
Storage-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
Once |
Error |
Storage information not found |
Ensure storage is configured and linked to the requested entity or dataset. |
|
|
400 |
None |
Error |
Invalid storage information |
Check the UModel documentation and provide a complete storage configuration. |
|
|
400 |
None |
Error |
xxxx requires SlsLogstore storage type |
Configure Simple Log Service (SLS) LogStore as the storage type for this operation. |
|
|
400 |
None |
Error |
xxxx only supports storage type: xxxx |
Configure the correct storage type for the MetricSet operation. |
|
|
400 |
None |
Error |
list_data_set only supports xxxx storage |
Use a supported storage type for the |
Dataset-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
Once |
Error |
DataSet UModel definition not found |
Ensure the dataset is defined in the UModel configuration. |
|
|
400 |
Once |
Error |
Target DataSet not found |
Ensure the target dataset exists and is configured correctly. |
|
|
400 |
Once |
Error |
Metric definition not found: xxxx |
Ensure the metric is defined in the UModel configuration. |
PromQL-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
Once |
Error |
Failed to rewrite PromQL: xxxx, error: xxxx |
Check the PromQL syntax for compatibility with the target system. |
|
|
400 |
None |
Error |
Static label query not supported |
Use a dynamic label query. |
|
|
400 |
Once |
Error |
Failed to convert Where expression to PromQL: xxxx, error: xxxx |
Check the |
Expression-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
Once |
Error |
Failed to parse expression: xxxx, error: xxxx |
Check the expression syntax. Refer to the UModel documentation for details. |
|
|
400 |
Once |
Error |
Failed to execute expression: xxxx, error: xxxx |
Check that the expression format is correct. Refer to the UModel documentation for details. |
Request errors of high-level APIs
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Invalid UModel Platform as a Service (PaaS) request data |
Check the UModel PaaS request format and ensure all required fields are provided. |
|
|
400 |
None |
Error |
Invalid Where expression |
Check the |
|
|
400 |
None |
Error |
Invalid UModel PaaS request query data |
Check that the query structure format is correct. Refer to the UModel documentation for details. |
Phase2 error codes
Entity-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
EntitySet does not exist: xxxx@entity_set@xxxx |
Ensure the EntitySet is defined in the UModel configuration. |
|
|
400 |
None |
Error |
EntitySet[xxxx] UModel definition not found |
Ensure the EntitySet is defined in the UModel configuration. |
|
|
400 |
None |
Error |
Entity data rows do not match header |
Ensure the entity data structure matches the defined header. |
|
|
400 |
None |
Error |
Dynamic Entity[xxxx] has no storage information |
Configure storage information for the dynamic entity. |
|
|
400 |
None |
Error |
Invalid entity IDs: xxxx |
Provide valid entity IDs in the correct format. |
|
|
400 |
None |
Error |
Storage query not found |
Ensure the storage query is configured correctly. |
Method call-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Phase 2 Object mode must contain function call |
Add a function call to the SPL query. Example: |
|
|
400 |
None |
Error |
EntitySet function arguments error. xxxx |
Check the function arguments to ensure they match the expected signature. |
|
|
400 |
None |
Error |
Method xxxx not supported |
Use a supported method. Refer to the API documentation for details. |
|
|
400 |
None |
Error |
xxxx unsupported method: xxxx |
Use a supported method for this dataset type. |
Related dataset errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
No related xxxx found |
Ensure the entity has related datasets. |
Golden metric-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Warn |
No golden metrics found related to xxxx |
Ensure the entity has golden metrics. |
|
|
200 |
None |
Warn |
Too many golden metrics found related to xxxx, now count is %d |
Only the first eight golden metrics are returned. To improve performance, ensure the entity has fewer than eight golden metrics. |
Neighbor entity query-related errors
|
Error code |
HTTP status code |
Retry policy |
Level |
Error message |
Suggestion |
|
|
400 |
None |
Error |
Storage link [xxxx] not found |
Ensure the StorageLink is configured correctly in UModel. |
|
|
400 |
None |
Error |
Unsupported storage type: xxxx |
Use a supported storage type. |
|
|
400 |
None |
Error |
Unsupported direction: xxxx, only ‘in’ or ‘out’ supported |
Use |
|
|
400 |
None |
Error |
Entity set link xxxx@entity_set@xxxx has no storage link configured |
Configure a StorageLink for the EntitySet relationship. |
|
|
400 |
None |
Error |
Invalid field mapping: xxxx |
Check the field mapping configuration to ensure the format is correct. |
Best practices for error handling
1. Understand the error code
Each error includes the following information:
-
Code: A unique identifier for the error.
-
Level: The severity of the error (
Info/Warn/Error). -
Message: A description of the error.
-
Suggestion: A recommendation for resolving the error.
-
RetryPolicy: The recommended retry strategy.
2. Use the retry policy
Use the RetryPolicy to determine whether to retry a request:
-
None: Do not retry. Applies to non-recoverable errors such as syntax mistakes.
-
Once: Retry once. Applies to transient errors.
-
Continuous: Retry until the operation succeeds. Applies to recoverable issues such as resource constraints.
3. Handle common error scenarios
EntitySet does not exist
-- Error: The EntitySet does not exist.
.entity_set with(domain='apm', name='nonexistent.service')
-- Correct: Use an existing EntitySet.
.entity_set with(domain='apm', name='apm.service')
Missing function call
-- Error: The query is missing a required function call for Phase 2 mode.
.entity_set with(domain='apm', name='apm.service')
-- Correct: Add a function call.
.entity_set with(domain='apm', name='apm.service')
| entity-call __list_method__()
Parameter validation failure
-- Error: Missing required parameter.
.metric_set with(name='apm.metric.apm.service')
-- Correct: Provide all required parameters.
.metric_set with(domain='apm', name='apm.metric.apm.service')
4. Use debugging techniques
Use inspection methods
-- Check available methods.
.entity_set with(domain='apm', name='apm.service')
| entity-call __list_method__()
-- Check the configuration.
.entity_set with(domain='apm', name='apm.service')
| entity-call __inspect__()
Use dry run mode
.set "umodel_paas_mode"='dry_run';
-- Execute the query to view the generated SPL.