(Legacy) Error Reporting error-reporting
Overview overview
Error reporting in Adobe Pass Authentication is currently implemented in two different ways:
-
Advanced Error Reporting The implementor registers an error callback in case of the AccessEnabler JavaScript SDK or implements an Interface method named “
status
” in case of the AccessEnabler iOS/tvOS SDK and AccessEnabler Android SDK, in order to receive advanced error reporting. Errors are categorized into Information, Warning, and Error types. This reporting system is asynchronous, in that there is no guarantee of the order in which multiple errors will be triggered. For details on the advanced error reporting system, see Advanced Error Reporting section. -
Original Error Reporting - A static reporting system in which error messages are passed to specific callback functions when specific requests fail. Errors are grouped into generic, authentication, and authorization types. For the list of error reported on in the original system, see the Original Error Reporting section.
Advanced Error Reporting advanced-error-reporting
AccessEnabler JavaScript SDK accessenabler-javascript-sdk
The new error reporting system is left optional, therefore the implementor can explicitly register an error handler callback to receive advanced error reports. The system includes the ability to register and unregister multiple error callbacks dynamically. In addition, you can register any new error callbacks as soon as the AccessEnabler JavaScript SDK is loaded, without the need to perform any other initialization (before calling setRequestor()
), meaning that you have the ability to receive advanced reports on initialization and configuration errors.
Implementation access-enab-js-imp
yourErrorHandler(errorData:Object)
Your error handler callback function will receive a single object (a map) with the following structure:
{
errorId: "CFG410",
level: "error",
message: "This a fancy message", // Optional
.
. // Optional key/value pairs
.
}
1. Bind bind
.bind(eventType:String, handlerName:String):void
Attaches a handler for an event.
eventType
- ONLY the “errorEvent
” value results in the AccessEnabler JavaScript SDK triggering advanced error reports callbacks.
handlerName
- a string specifying the name of the errors handler function.
Both bind parameters must use only characters from the following set: [0-9a-zA-Z][-._a-zA-Z0-9]
; that is, parameters must start with a number or letter, and can then include only hyphens, periods, underscores, and alpha-numeric characters. In addition, parameters cannot exceed 1024 characters.
Example of binding error handlers:
accessEnabler.bind('errorEvent', 'myCustomErrorHandler');
accessEnabler.bind('errorEvent', 'errorLogger');
Due to technical limitations you cannot bind a closure or an anonymous function. You must specify the name of the method in the second parameter.
2. Unbind unbind
.unbind(eventType:String, handlerName:String=null):void
Removes a previously-attached event handler.
eventType
- ONLY the ‘errorEvent
’ value results in the AccessEnabler JavaScript SDK triggering advanced error reports callbacks.
handlerName
- a string specifying the name of the errors handler function, if is null or missing all attached handlers for the specified eventType
will be removed.
Both bind parameters must use only characters from the following set: [0-9a-zA-Z][-._a-zA-Z0-9]
; that is, parameters must start with a number or letter, and can then include only hyphens, periods, underscores, and alpha-numeric characters. In addition, parameters cannot exceed 1024 characters.
Example of removing a single error handler:
accessEnabler.unbind('errorEvent', 'errorLogger');
Example removing all error handlers:
accessEnabler.unbind('errorEvent');
AccessEnabler iOS/tvOS SDK accessenabler-ios-tvos-sdk
The new error reporting system is mandatory, therefore the implementor must explicitly conform to the new Objective C “EntitlementStatus” protocol. This new approach allows programmers to receive advanced error reporting.
Implementation accessenab-ios-tvossdk-imp
An implementor needs to conform to the following EntitlementStatus protocol:
EntitlementStatus.h
#import <Foundation/Foundation.h>
@protocol EntitlementStatus <NSObject>
- (void)status:(NSDictionary *)statusDictionary;
@end
Your status function will receive a single object (an NSDictionary
) with the following structure:
{
errorId: "CFG410",
level: "error",
message: "This a fancy message", // Optional
.
. // Optional key/value pairs
.
}
1. Declaration
@interface MyEntitlementStatusDelegate : NSObject <EntitlementStatus>
2. Implementation
@implementation DemoAppAppDelegate
// very simple implementation
- (void)status:(NSDictionary *)statusDict {
NSLog(@"%@:\n%@", statusDict[@"level"], statusDict);
}
AccessEnabler Android SDK accessenabler-android-sdk
The new error reporting system is mandatory, because the implementor must explicitly conform to the IAccessEnablerDelegate
interface defined protocol. This new approach allows programmers to receive advanced error reporting.
Implementation access-enablr-androidsdk-imp
An implementor needs to handle the new status
method from the interfaceIAccessEnablerDelegate
. The status
function will receive a single AdvancedStatus
object having the following model:
class AdvancedStatus {
String id; // Not Null
String level; // Not Null
String message; // Might be null
String resource; // Might be null
AdvancedStatus(String id, String level, String message, String resource) {
this.id = id;
this.level = level;
this.message = message;
this.resource = resource;
}
//other private/public methods
}
Sample
@Override
public void status(AdvancedStatus advancedStatus) {
String status = "status(" + advancedStatus.id + ", " + advancedStatus.level + ", " + advancedStatus.message + ", " + advancedStatus.resource + ")";
Log.i(LOG_TAG, status);
}
AccessEnabler FireOS SDK accessenabler-fireos-sdk
The new error reporting system is mandatory, because the implementor must explicitly conform to the IAccessEnablerDelegate
interface defined protocol. This new approach allows programmers to receive advanced error reporting.
Implementation access-enab-fireos-sdk-
An implementor needs to handle the new status
method from the interfaceIAccessEnablerDelegate
. The status
function will receive a single AdvancedStatus
object having the following model:
class AdvancedStatus {
String id; // Not Null
String level; // Not Null
String message; // Might be null
String resource; // Might be null
AdvancedStatus(String id, String level, String message, String resource) {
this.id = id;
this.level = level;
this.message = message;
this.resource = resource;
}
//other private/public methods
}
Sample
@Override
public void status(AdvancedStatus advancedStatus) {
String status = "status(" + advancedStatus.id + ", " + advancedStatus.level + ", " + advancedStatus.message + ", " + advancedStatus.resource + ")";
Log.i(LOG_TAG, status);
}
Advanced Error Codes Reference advanced-error-codes-reference
The following table lists and describes the error codes exposed by the newer error API, along with suggested actions to be taken to correct them:
Instruct/prompt the user to explicitly sign out from Settings -> TV Provider on iOS/iPadOS.
Explicitly sign out from Settings -> TV Provider on iOS/iPadOS
- Contact Adobe in order to manage the domain whitelist for the Requestor ID used
- iOS: verify that you are using the correct certificate and that the signature is created properly
- Optionally, inform the user that he needs to log in again.
[https://]{SP_FQDN\}
in the browser and manually accept the SSL certificates, for example, https://api.auth.adobe.com or https://api.auth-staging.adobe.com- Mark the proxy certs as trusted
Take actions to prevent entitlement flows, since they will likely fail.
- The developer has an invalid spoofing in place.
-The user has networking issues and cannot reach the Adobe Pass Authentication domains.
-Adobe Pass Authentication servers are misconfigured.
Note: On Firefox, CFG400 will appear instead of CFG404 (browser limitation)
-Check network / DNS settings.
-Inform Adobe.
- Bypass Adobe Pass Authentication.
- Inform Adobe.
- Optionally present a list of regular MVPDs.
- Present a list of regular MVPDs.
- Hide the TempPass option.
1. Browser has (3rd-party) cookies disabled (Not applicable for AccessEnabler JavaScript SDK version 4.x)
2. Browser has Prevent cross-site tracking enabled (Safari 11+)
3. Session has expired
4. Programmer calls authentication APIs in incorrect succession
NOTE: This error code is not available for full-page redirect authentication flows.
2. Promt user to disable cross-site tracking
3. Prompt user to re-authenticate
4. Call APIs in correct order
2. Disable cross-site tracking
3. Re-authenticate
4. N/A
Note: This is the original error system’s “Generic Authentication Error” and “Internal Authentication Error”. This error will eventually be phased out.
Note: This is an unrecoverable error. Inform the user that the application is unavailable.
- JavaScript: Check the software statement in your website application.
Open a ticket using Zendesk and inform the user that the system is temporarily unavailable
Note: This is an unrecoverable error. Inform the user that the application is unavailable.
- JavaScript: Check the software statement in your website application.
Open a ticket using Zendesk and inform the user that the system is temporarily unavailable
Note: This is an unrecoverable error. Inform the user that the application is unavailable.
- Inform the user.
- The ‘message’ key in the error message MAY contain a more detailed message supplied by the MVPD.
- Inform the user.
- Inform the user that the MVPD experienced difficulties and they should try later.
Note: this is the legacy “Generic Authentication Error” and “Internal Authentication Error”. This error will eventually be phased out.
- Contact Adobe Pass Authentication support to find / set up the maximum number of allowed resources.
Authentication / authorization does not persist beyond current page!. Each page load will result in the user needing to authenticate. Configured TTLs are not enforced across page reloads.
- Inform the user how to increase available storage space.
- Alternatively logout in order to clear the storage.
- Logout in order to clear storage.
Original Error Reporting original-error-reporting
This section describes the original error reporting system, along with the original error codes. In the original error reporting system, the AccessEnabler passes errors to these two callback functions: setAuthenticationStatus()
after a call to checkAuthentication()
; tokenRequestFailed()
, after the failure of a call to checkAuthorization()
or getAuthorization()
.
The original error reporting and status API’s continue to work exactly as before. However, going forward the original error reporting API’s will not be updated. All new error reporting and updates on the old errors will be reflected ONLY in the newe Advanced Error Reporting system.
For examples of using the original error reporting system, see the JavaScript API Reference:setAuthenticationStatus() and tokenRequestFailed() functions, iOS/tvOS API Reference: setAuthenticationStatus()and tokentRequestFailed(), Android API Reference: setAuthenticationStatus() and tokenRequestFailed().