@alex.garcia/libfec / FecError
Class: FecError
Defined in: errors.ts:23
Base class of every error this package raises about a filing. code says which kind:
code | When |
|---|---|
FEC_PARSE | FecParseError: the header, cover or a row can't be parsed |
FEC_MISSING_MAPPING | MissingMappingError: no column mapping for a row type |
ERR_FILING_CLOSED | reading a Filing after close() |
ERR_FILING_NOT_FOUND | Filing.fromId: docquery has no such filing (HTTP 404); status is set |
ERR_HTTP | Filing.fromId: any other non-2xx response; status is set |
A missing or unreadable path is not a FecError: it throws the same error Node's fs.openSync would (code: "ENOENT", path, syscall: "open"). Nor is a network failure: Filing.fromId and rss.fetch let the runtime's fetch() error through, except that a browser's CORS block becomes a TypeError with code: "ERR_CORS" that explains it.
Extends
Error
Extended by
Constructors
Constructor
new FecError(
message,options?):FecError
Defined in: errors.ts:29
Parameters
message
string
options?
code?
string
status?
number
cause?
unknown
Returns
FecError
Overrides
Error.constructor
Properties
code?
optionalcode?:string
Defined in: errors.ts:25
What went wrong; see the table above.
status?
optionalstatus?:number
Defined in: errors.ts:27
The HTTP status, for ERR_FILING_NOT_FOUND and ERR_HTTP.