Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

518 Added error UserCancelled to the ResolveError enumeration #522

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Added support for raiseIntent without a context via the addition of the `fdc3.nothing` context type ([#375](https://github.com/finos/FDC3/pull/375))
* Added [**FDC3 Workbench**](https://fdc3.finos.org/toolbox/fdc3-workbench/), an FDC3 API developer application ([#457](https://github.com/finos/FDC3/pull/457))
* Added advice on how to `broadcast` complex context types, composed of other types, so that other apps can listen for both the complex type and simpler constituent types ([#464](https://github.com/finos/FDC3/pull/464))
* Added error `UserCancelled` to the `ResolveError` enumeration to be used when user closes the resolver UI or otherwise cancels resolution of a raised intent ([#XXX](https://github.com/finos/FDC3/pull/XXX))
kriswest marked this conversation as resolved.
Show resolved Hide resolved

### Changed
* Consolidated `Listener` documentation with other types ([#404](https://github.com/finos/FDC3/pull/404))
Expand Down
6 changes: 3 additions & 3 deletions docs/api/ref/DesktopAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Find all the avalable intents for a particular context.
`findIntentsByContext` is effectively granting programmatic access to the Desktop Agent's resolver.
A promise resolving to all the intents, their metadata and metadata about the apps that registered as handlers is returned, based on the context types the intents have registered.

If the resolution fails, the promise will return an `Error` with a string from the [`ResolveError`](ResolveError) enumeration.
If the resolution fails, the promise will return an `Error` with a string from the [`ResolveError`](ResolveError) enumeration.
kriswest marked this conversation as resolved.
Show resolved Hide resolved
kriswest marked this conversation as resolved.
Show resolved Hide resolved

#### Example
```js
Expand Down Expand Up @@ -391,7 +391,7 @@ If you wish to raise an Intent without a context, use the `fdc3.nothing` context

Returns an `IntentResolution` object with details of the app that was selected to respond to the intent.

If a target app for the intent cannot be found with the criteria provided, an `Error` with a string from the [`ResolveError`](Errors#resolverrror) enumeration is returned.
If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration is returned.

#### Example

Expand Down Expand Up @@ -434,7 +434,7 @@ Using `raiseIntentForContext` is similar to calling `findIntentsByContext`, and

Returns an `IntentResolution` object with a handle to the app that responded to the selected intent.

If a target app for the intent cannot be found with the criteria provided, an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration is returned.
If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, an `Error` with a string from the [`ResolveError`](Errors#resolveerror) enumeration is returned.

#### Example

Expand Down
9 changes: 5 additions & 4 deletions docs/api/ref/Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ Contains constants representing the errors that can be encountered when calling
## `ResolveError`

```typescript
enum ResolveError {
NoAppsFound = "NoAppsFound",
ResolverUnavailable = "ResolverUnavailable",
ResolverTimeout = "ResolverTimeout"
export enum ResolveError {
NoAppsFound = 'NoAppsFound',
ResolverUnavailable = 'ResolverUnavailable',
UserCancelled = 'UserCancelledResolution',
ResolverTimeout = 'ResolverTimeout',
}
```

Expand Down
1 change: 1 addition & 0 deletions src/api/Errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum OpenError {
export enum ResolveError {
NoAppsFound = 'NoAppsFound',
ResolverUnavailable = 'ResolverUnavailable',
UserCancelled = 'UserCancelledResolution',
ResolverTimeout = 'ResolverTimeout',
}

Expand Down