API Reference > imodeljs-clients > iTwinServiceClients > WsgError WsgError Class Beta Error that was returned by a WSG based service. Extends ResponseError Extended by IModelHubError Methods Name Description constructor(errorNumber: number | HttpStatus, message?: string, getMetaData?: GetMetaDataFunction): WsgError log(): void Logs this error getErrorStatus(errorId: number, httpStatusType: number): number Static Gets error status from current WSError and HTTP Status type getWSStatusId(error: string): number Static Get WSError from error string parse(response: any, log: boolean = true): ResponseError Static Attempt to parse the error from the response. shouldRetry(error: any, response: any): boolean Static Decides whether request should be retried or not Inherited methods Name Inherited from Description _initName(): string Protected BentleyError This function returns the name of each error status. getMetaData(): any BentleyError Return the meta data associated with this BentleyError. Inherited properties Name Type Inherited from Description _data Protected undefined | any ResponseError description undefined | string ResponseError errorNumber number BentleyError hasMetaData Accessor ReadOnly boolean BentleyError Returns true if this BentleyError includes (optional) meta data. message string Error name string Error stack undefined | string Error status undefined | number ResponseError Defined in core/clients/src/WsgClient.ts Line 23 Last Updated: 13 June, 2024