Skip to main content
Version: 1.0

Errors

FDC3 API operations may sometimes result in an error, which must be returned to the caller. Errors should be returned by rejecting the promise returned by the API with a JavaScript Error object (or equivalent for the language of the implementation). The Error Object's message should be chosen from the appropriate Error enumeration below.

ChannelError

enum ChannelError {
/** Returned if the specified channel is not found when attempting to join a
* channel via the `joinUserChannel` function of the DesktopAgent (`fdc3`).
*/
NoChannelFound = 'NoChannelFound',

/** SHOULD be returned when a request to join a user channel or to a retrieve
* a Channel object via the `joinUserChannel` or `getOrCreateChannel` methods
* of the DesktopAgent (`fdc3`) object is denied.
*/
AccessDenied = 'AccessDenied',

/** SHOULD be returned when a channel cannot be created or retrieved via the
* `getOrCreateChannel` method of the DesktopAgent (`fdc3`).
*/
CreationFailed = 'CreationFailed',
}

Contains constants representing the errors that can be encountered when calling channels using the joinUserChannel or getOrCreateChannel methods, or the getCurrentContext, broadcast or addContextListener methods on the Channel object.

See also

OpenError

enum OpenError {
/** Returned if the specified application is not found.*/
AppNotFound = 'AppNotFound',

/** Returned if the specified application fails to launch correctly.*/
ErrorOnLaunch = 'ErrorOnLaunch',

/** Returned if the specified application launches but fails to add a context
* listener in order to receive the context passed to the `fdc3.open` call.
*/
AppTimeout = 'AppTimeout',

/** Returned if the FDC3 desktop agent implementation is not currently able
* to handle the request.
*/
ResolverUnavailable = 'ResolverUnavailable',
}

Contains constants representing the errors that can be encountered when calling the open method on the DesktopAgent object.

See also

ResolveError

export enum ResolveError {
/** SHOULD be returned if no apps are available that can resolve the intent
* and context combination.
*/
NoAppsFound = 'NoAppsFound',

/** Returned if the FDC3 desktop agent implementation is not currently able
* to handle the request.
*/
ResolverUnavailable = 'ResolverUnavailable',

/** Returned if the user cancelled the resolution request, for example by
* closing or cancelling a resolver UI.
*/
UserCancelled = 'UserCancelledResolution',

/** SHOULD be returned if a timeout cancels an intent resolution that
* required user interaction. Please use `ResolverUnavailable` instead for
* situations where a resolver UI or similar fails.
*/
ResolverTimeout = 'ResolverTimeout',

/** Returned if a specified target application is not available or a new
* instance of it cannot be opened.
*/
TargetAppUnavailable = 'TargetAppUnavailable',

/** Returned if a specified target application instance is not available,
* for example because it has been closed.
*/
TargetInstanceUnavailable = 'TargetInstanceUnavailable',

/** Returned if the intent and context could not be delivered to the selected
* application or instance, for example because it has not added an intent
* handler within a timeout.
*/
IntentDeliveryFailed = 'IntentDeliveryFailed',
}

Contains constants representing the errors that can be encountered when calling the findIntent, findIntentsByContext, raiseIntent or raiseIntentForContext methods on the DesktopAgent.

See also

ResultError

enum ResultError {
/** Returned if the `IntentHandler` exited without returning a Promise or that
* Promise was not resolved with a Context or Channel object.
*/
NoResultReturned = 'NoResultReturned',

/** Returned if the `IntentHandler` function processing the raised intent
* throws an error or rejects the Promise it returned.
*/
IntentHandlerRejected = 'IntentHandlerRejected',
}

Contains constants representing the errors that can be encountered when calling the getResult method on the IntentResolution Object.

See also