From cdd1608a4682f4552c4f181c9e9a455515a2f5b4 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 8 Nov 2024 14:38:35 -0500 Subject: [PATCH] Add a missing docstring --- src/http-api/errors.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http-api/errors.ts b/src/http-api/errors.ts index 3c3bbe78a1..4f02ff11b3 100644 --- a/src/http-api/errors.ts +++ b/src/http-api/errors.ts @@ -157,6 +157,10 @@ export class MatrixError extends HTTPError { }; } + /** + * @returns a new {@link MatrixError} from a JSON payload + * received from Widget API error responses. + */ public static fromWidgetApiErrorData(data: IWidgetMatrixError): MatrixError { return new MatrixError(data.response, data.http_status, data.url, undefined, new Headers(data.http_headers)); }