Skip to content

Commit 94ffc7b

Browse files
committed
Match new widget API types
1 parent 69acadd commit 94ffc7b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stores/widgets/StopGapWidgetDriver.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import {
1010
Capability,
1111
EventDirection,
12-
IMatrixApiError as IWidgetMatrixError,
1312
IOpenIDCredentials,
1413
IOpenIDUpdate,
1514
ISendDelayedEventDetails,
@@ -25,6 +24,7 @@ import {
2524
WidgetDriver,
2625
WidgetEventCapability,
2726
WidgetKind,
27+
IWidgetApiErrorResponseDataDetails,
2828
ISearchUserDirectoryResult,
2929
IGetMediaConfigResult,
3030
UpdateDelayedEventAction,
@@ -693,13 +693,13 @@ export class StopGapWidgetDriver extends WidgetDriver {
693693
}
694694

695695
/**
696-
* Expresses a {@link MatrixError} as a {@link IWidgetMatrixError}
696+
* Expresses a {@link MatrixError} as a {@link IWidgetApiErrorResponseDataDetails}
697697
* for use by Widget API error responses.
698698
* @param error The error to handle.
699-
* @returns The error expressed as a {@link IWidgetMatrixError},
699+
* @returns The error expressed as a {@link IWidgetApiErrorResponseDataDetails},
700700
* or undefined if it is not a {@link MatrixError}.
701701
*/
702-
public processError(error: unknown): IWidgetMatrixError | undefined {
703-
return error instanceof MatrixError ? error.asWidgetApiErrorData() : undefined;
702+
public processError(error: unknown): IWidgetApiErrorResponseDataDetails | undefined {
703+
return error instanceof MatrixError ? { matrix_api_error: error.asWidgetApiErrorData() } : undefined;
704704
}
705705
}

0 commit comments

Comments
 (0)