Skip to main content

Session errors

getURL error codes

Session creation errors

Creating a session through the getURL method returns a StreamingSessionResult object. The result contains:

  • a success status: the session is started and a streaming URL can be passed to the player
  • or an error code: the session has to be stopped and the app has to trigger a specific behavior
// Get the error code
int errorCode = result.getErrorCode();

// For some error codes, a detailed error code is specified
int detailedErrorCode = result.getDetailedErrorCode();
String detailedErrorMessage = result.getDetailedErrorMessage();

All error codes and detailed error codes are specified below.

Code example:

// Try to start a session
StreamingSessionResult result = session.getURL(VIDEO_URL1);

// The session result is ending with an error
if (result.isError()) {
// Get the error code
int errorCode = result.getErrorCode();

// For some error codes, a detailed error code is specified
int detailedErrorCode = result.getDetailedErrorCode();

switch (errorCode) {
case StreamingSessionResult.RESULT_REQUESTED_URL_NOT_FOUND_ON_CDN: // Error 4XX returned by the CDN (BkM/uCDN/Broadpeak.io)
if (detailedErrorCode == 404) {
// example: show channel not found message
} else if (detailedErrorCode == 401) {
// example: trigger authentication
} else if (detailedErrorCode == 2000) {
// example: show cdn error
}
break;
}

// Stop the session
session.stopStreamingSession();
} else {
// No error, pass the streaming URL to the player
}

Result error codes

Name
CodeDescription
RESULT_NO_STREAMING_URL_FOUND3100Unknown error when requesting the CDN (BkM/uCDN/Broadpeak.io).

Detailed error code: CDN status code if available or RESULT_NO_DETAILED_ERROR.
RESULT_CDN_RESPONSE_UNREADABLE3101Timeout error, CORS error or connection error when requesting the CDN (BkM/uCDN/Broadpeak.io).

No detailed error code.
RESULT_REQUESTED_URL_NOT_FOUND_ON_CDN3102Error 4XX returned by the CDN (BkM/uCDN/Broadpeak.io).

Detailed error code: CDN status code.
RESULT_REQUESTED_URL_NOT_FOUND_ON_NANOCDN3103Requested URL not found on the nanoCDN (404 error, content not found with multicast only enabled, unknown error). In case of gateway stacking, the detailed error code is set to the last nanoCDN request status code.

Detailed error code: nanoCDN status code if available or RESULT_NO_DETAILED_ERROR.
RESULT_REQUESTED_URL_CDN_ERROR3104Error 5XX returned by the CDN (BkM/uCDN/Broadpeak.io).

Detailed error code: CDN status code.
RESULT_NANOCDN_SESSION_LIMIT_REACHED3201All nanoCDN on the network responded with session limit reached error. In case of gateway stacking, the detailed error code is set to the last nanoCDN request status code.

Detailed error code: nanoCDN status code.
RESULT_NANOCDN_SESSION_LIMIT_REACHED_ON_REQUESTED_CHANNEL3202All nanoCDN on the network responded with session limit reached error for the requested channel. In case of gateway stacking, the detailed error code is set to the last nanoCDN request status code.

Detailed error code: nanoCDN status code.
RESULT_NANOCDN_SERVICE_UNAVAILABLE3203All nanoCDN on the network have their services unavailable. In case of gateway stacking, the detailed error code is set to the last nanoCDN request status code.

Detailed error code: nanoCDN status code.
RESULT_NANOCDN_CHANNEL_UNAVAILABLE3204The requested channel is unavailable on all nanoCDN of the network. In case of gateway stacking, the detailed error code is set to the last nanoCDN request status code.

Detailed error code: nanoCDN status code.
RESULT_NANOCDN_REQUEST_LOCAL_IF_CONNECTED_TO_WIFI_NOT_ALLOWED3205A nanoCDN on 127.0.0.1 has been found and is connected to Wi-Fi but it is not allowed.

No detailed error code.
RESULT_NANOCDN_RESPONSE_UNREADABLE3206Timeout error, CORS error or connection error when requesting the nanoCDN.

No detailed error code.
RESULT_API_PARAMETER_FORMAT_ERROR3400The requested URL is not a string or is empty.

No detailed error code.
RESULT_API_NOT_INITIALIZED3401API called while SmartLib is not initialized.

No detailed error code.
RESULT_SESSION_HAS_BEEN_STOPPED_DURING_REQUEST3402The session has been stopped during getURL request.

No detailed error code.
RESULT_REQUEST_ALREADY_DONE3403The request has already been done for that session (i.e getURL called twice).

No detailed error code.
info

On iOS & tvOS, all error names are prefixed by SMARTLIB_

Use SMARTLIB_RESULT_REQUESTED_URL_NOT_FOUND_ON_CDN for the error name RESULT_REQUESTED_URL_NOT_FOUND_ON_CDN