Error Codes
Common error codes, converged charging error codes, spending limit control error codes, and network function error codes might occur during operation of SBA Gateway.
Errors
Error responses are formatted according to 3GPP TS.29571 and IETF RFC 7807:
- The Content-Type is set to
application/problem+json
. - The body is a
ProblemDetails
object.
For example:
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
Content-Language: en
{
"type": "https://example.net/validation-error",
"title": "Your request parameters didn't validate.",
"invalid-params": [ {
"name": "age",
"reason": "must be a positive integer"
},
{
"name": "color",
"reason": "must be 'green', 'red' or 'blue'"}
]
}
Common Error Codes
Common Error Codes shows common error codes typically sent by an SBA Gateway network function. These error codes are defined in 3GPP TS 29.500 table 5.2.7.2-1 ("Protocol and application errors common to several 5GC SBI API specifications" in "NF as HTTP Server").
Protocol or Application Error | HTTP Status Code | Description |
---|---|---|
INVALID_API | 400 Bad Request | The HTTP request has an unsupported API name or API version in the URI. |
INVALID_MSG_FORMAT | 400 Bad Request | The HTTP request has an invalid format. |
INVALID_QUERY_PARAM | 400 Bad Request | The HTTP request has an unsupported query parameter in the URI. |
MANDATORY_IE_INCORRECT | 400 Bad Request | A mandatory IE or conditional IE in data structure, but mandatory required, for an HTTP method was received with a semantically wrong value. |
MANDATORY_IE_MISSING | 400 Bad Request | An IE that is defined as mandatory or as conditional in data structure, but mandatory required, for an HTTP method is not included in the payload body of the request. |
UNSPECIFIED_MSG_FAILURE | 400 Bad Request | The request is rejected due to unspecified client error. |
MODIFICATION_NOT_ALLOWED | 403 Forbidden | The request is rejected because the contained modification instructions try to modify an IE that is not allowed to be modified. |
SUBSCRIPTION_NOT_FOUND | 404 Not Found | The request for modification or deletion of subscription is rejected because the subscription is not found in the NF. |
RESOURCE_URI_STRUCTURE_NOT_FOUND | 404 Not Found |
The request is rejected. A fixed part after the first variable part of an "apiSpecificResourceUriPart" (as defined in subclause 4.4.1 of 3GPP TS 29.501 [5]) is not in the NF. This fixed part of the URI can represent a sub-resource collection (for example, contexts, subscriptions, policies) or a custom operation. |
INCORRECT_LENGTH | 411 Length Required | The request is rejected due to a wrong value of a Content-length header field. |
NF_CONGESTION_RISK | 429 Too Many Requests | The request is rejected due to excessive traffic which, if continued over time, can lead to (or can increase) an overload situation. The HTTP response header is
Retry-After: 10. |
INSUFFICIENT_RESOURCES | 500 Internal Server Error | The request is rejected due to insufficient resources. The HTTP response header
is Retry-After: 10. |
UNSPECIFIED_NF_FAILURE | 500 Internal Server Error | The request is rejected due to unspecified reason at the NF. |
SYSTEM_FAILURE | 500 Internal Server Error | The request is rejected due to generic error condition in the NF. |
NF_CONGESTION | 503 Service Unavailable | The NF experiences congestion and performs overload control, which does not
allow the request to be processed. The HTTP response header is Retry-After:
10. |
SERVICE_UNAVAILABLE | 503 Service Unavailable | The request is rejected because the NF (or one of its dependencies) is not
available. The HTTP response header is Retry-After: 10. |
Converged Charging Error Codes
In addition to the errors defined in Common Error Codes, the Converged Charging API can also send the following (as defined in 3GPP TS 32.291 table 6.1.7.3-1). Converged Charging Error Codes shows these converged charging error codes:
Protocol or Application Error | HTTP Status Code | Description |
---|---|---|
CHARGING_FAILED | 400 Bad Request | The HTTP request is rejected because the set of session or subscriber information that is needed by the CHF for charging or CDR creation is incomplete, erroneous, or not available. For example, this can happen with rating group, subscriber information. |
USER_UNKNOWN | 403 Forbidden | The HTTP request is rejected because the end user specified in the request cannot be served by the CHF. |
END_USER_REQUEST_DENIED | 403 Forbidden | The HTTP request denied by the CHF due to restrictions or limitations related to the end-user. |
QUOTA_LIMIT_REACHED | 403 Forbidden | The HTTP request denied by the CHF because the end user's account cannot cover the requested service. If the request contained used units they are deducted, if applicable. |
END_USER_REQUEST_REJECTED | 403 Forbidden | The HTTP request rejected by the CHF due to end-user restrictions or limitations. |
Spending Limit Control Error Codes
Spending Limit Control Error Codes shows the error codes for spending limits:
Protocol or Application Error | HTTP Status Code | Description |
---|---|---|
USER_UNKNOWN | 400 Bad Request | The subscriber specified in the request is not known at the CHF and the subscription cannot be created. |
NO_AVAILABLE_POLICY_COUNTERS | 400 Internal Server Error | No policy counters are available for the subscriber at the CHF. |
UNKNOWN_POLICY_COUNTERS | 400 Bad Request | The policy counter identifiers in the request are not known at the CHF. |
Network Function Error Codes
Every REST URI that forwards requests to MATRIXX Engine
provides configuration to map error responses to the appropriate
ProblemDetails
error.
The charging data and spending limit control URIs define the following
resultCodes
by default. These are in addition to the scenarios that can
cause the errors defined in common error codes (such as a badly formed message).
Engine Result Value | Engine ResultDetail Value | SBA Error Code |
---|---|---|
Converged Charging | ||
0 | SUCCESS | |
10 | INVALID_MSG_FORMAT | |
10 | 48 | USER_UNKNOWN |
11 | USER_UNKNOWN | |
11 | 42 | CHARGING_FAILED |
11 | 46 | USER_UNKNOWN |
11 | 48 | USER_UNKNOWN |
11 | 55 | CHARGING_FAILED |
19 | CHARGING_FAILED | |
25 | SYSTEM_FAILURE | |
26 | INSUFFICIENT_RESOURCES | |
28 | SYSTEM_FAILURE | |
29 | SYSTEM_FAILURE | |
30 | END_USER_REQUEST_DENIED | |
96 | END_USER_REQUEST_DENIED | |
100 | END_USER_REQUEST_DENIED | |
100 | 42 | END_USER_REQUEST_DENIED |
Spending Limit | ||
0 | SUCCESS | |
10 | INVALID_MSG_FORMAT | |
10 | 42 | MANDATORY_IE_INCORRECT |
11 | USER_UNKNOWN | |
11 | 55 | UNKNOWN_POLICY_COUNTERS |
26 | 55 | NO_AVAILABLE_POLICY_COUNTERS |
97 | END_USER_REQUEST_DENIED | |
100 | END_USER_REQUEST_DENIED |
More precise matches (that is, matching of both the Result and the
ResultDetails
) are used in preference to less precise (that is, matching
when only the Result value is defined).
The error code mapping (that is, MATRIXX Engine response to SBA response) is defined within the
nf-defaults.yaml configuration. This file is included chf-sideloader-template.zip file. This allows for the response to be based on just the Result
value of the response or the Result and the ResultDetails
values. In addition to negative outcomes, a Result (or Result and ResultDetail
) value can be mapped
to SUCCESS, which denotes that the message must not be treated as an error. These can be updated or modified by adding overriding configuration to the nf.yaml.
This example shows how error codes in the converged charging API and spending limit control APIs are defined:
mdc:
handlers:
chargingData:
resultCodes:
- engineResult: 0
sbaResponse: SUCCESS
- engineResult: 10
sbaResponse: INVALID_MSG_FORMAT
- engineResult: 10
engineResultDetails: 48
sbaResponse: USER_UNKNOWN
# shortened for example
- engineResult: 39
sbaResponse: END_USER_REQUEST_DENIED
spendingLimitControl:
resultCodes:
- engineResult: 0
sbaResponse: SUCCESS
- engineResult: 10
sbaResponse: INVALID_MSG_FORMAT
- engineResult: 10
engineResultDetails: 42
sbaResponse: MANDATORY_IE_INCORRECT
- engineResult: 26
sbaResponse: NO_AVAILABLE_POLICY_COUNTERS
Each resultCode
element has an engineResult
, an sbResponse
and, optionally, an engineResultDetails
value. The
sbaResponse
values correlate with the error codes defined in the tables (except for SUCCESS). They dictate the HTTP status code used and the basic contents of the
ProblemDetails
response object.
Customizing Errors
resultCodes
is an array, and when you define resultCodes
in your custom nf.yaml file, it overrides the entire array. You can do
the following by modifying the gateway.errors
structure in your nf.yaml file:- Change error wording.
- Change the returned HTTP status.
- Define the HTTP headers sent with the response.
- Add a custom error.
Use uppercase for names, and use underscore characters instead of spaces. Defining a new key adds a new error definition. Re-defining an existing key replaces the existing error definition with yours.
Custom Error Definition Properties shows the properties of custom errors, with typical values:
Property Name | Description | Example |
---|---|---|
status | The HTTP Status to return to the client. | 400 |
title | A user-friendly summary of the error. | Charging Failed |
type | The type value in the ProblemDetails . This is prefixed with the URI of the server. |
/errors/charging-failed |
Change the HTTP status and title of the CHARGING_FAILED
error definition by adding to your nf.yaml file, for example (commented ends of lines show the
preceding entries):
gateway:
errors:
CHARGING_FAILED:
type: "/errors/charging-failed"
title: "Oh No! Charging Failed" # Changed from 'Charging Failed'
status: 500 # (changed from 400 BadRequest)
A new definition for an error called CUSTOM_ERROR
is an addition to your nf.yaml file like the following:
gateway:
errors:
CUSTOM_ERROR:
type: "/errors/custom-error"
title: "This is my custom error"
status: 418 #IAmATeapot
Known Alarms
SBA Gateway can raise alarms in certain scenarios. These messages are written to logs and can be picked up by third-party logging to take the relevant action. Known Common Alarms shows the known common alarms:
Message Pattern | Type | Description | Resolution/Action |
---|---|---|---|
Engine Responded with {Result} [{ResultDetail}] - {ResulText} | Message | The engine has responded to a message with a failure code. | Action dependant on the details of the returned data. |
Unable to communicate with MATRIXX Engine. {Exception} | Internal Communication | Communication between the SBA and the engine has failed. | Investigate connectivity. |
Unable to communicate with MATRIXX Engine. The response from the engine was null. | Internal Communication | Communication between the SBA and the engine has failed. | Investigate connectivity. |
No Session ID / ChargingDataRef was provided from the engine response! | Message | The engine response for a ChargingDataRequest does not contain
a session ID. |
Investigate cause in the engine. |
No Spending Limit Subscription ID was provided from the engine Response! | Message | The engine response for a SpendingLimit request does not
contain a session ID. |
Investigate cause in the engine. |
There was an issue with the HTTP request to {URL} | External Communication | An HTTP call to a remote server has responded with a negative response. | Investigate cause with remote server. |
Unexpected request of type {Type} received. Expecting Mtx5GNotifyRequest. | Internal Communication | The SBA notification queue has received an unexpected MDC type. | Investigate why invalid message was added to queue. |
Unable to create Notify Request to Network | External Communication | The SBA was unable to send a notification to an external server. | Investigate cause in following exception. |
JMS Support must be enabled before adding JMS Listeners | Configuration | JMS support has been disabled but JMS listeners have been defined. | Ensure JMS is enabled. |