API Reference > imodeljs-common > iModels > BentleyError > constructor constructor Method Construct a new BentleyError BentleyError(errorNumber: number, message?: string, log?: LogFunction, category?: string, getMetaData?: GetMetaDataFunction): BentleyError Parameter Type Description errorNumber number The required error number originating from one of the standard status enums.See IModelStatus, DbResult, BentleyStatus, BriefcaseStatus, RepositoryStatus, ChangeSetStatus, HttpStatus, WSStatus, IModelHubStatus message string The optional error message (should not be localized). log LogFunction The optional LogFunction that should be used to log this BentleyError. category string The optional logger category to use when logging. getMetaData GetMetaDataFunction Optional data to be passed to the logger. Returns - BentleyError Defined in core/bentley/lib/BentleyError.d.ts Line 376 Last Updated: 12 June, 2024