Skip to content

Commit

Permalink
Add a missing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Nov 8, 2024
1 parent 4e3c362 commit cdd1608
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/http-api/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit cdd1608

Please sign in to comment.