Class: BlobFetchError
Defined in: src/atproto/errors/repository-errors.ts:202
Error thrown when blob fetching fails.
Remarks
This error indicates failure to fetch a blob (PDF, image, etc.) from a user's PDS. The blob may exist but be inaccessible, or may not exist.
Example
try {
const stream = await repository.getBlob(did, cid);
} catch (error) {
if (error instanceof BlobFetchError) {
logger.warn('Blob fetch failed', { cid: error.cid, reason: error.reason });
}
}
Extends
Constructors
new BlobFetchError()
new BlobFetchError(
message,did,cid,reason,cause?):BlobFetchError
Defined in: src/atproto/errors/repository-errors.ts:229
Creates a new BlobFetchError.
Parameters
message
string
Description of the fetch failure
did
string
DID of the repository owner
cid
string
CID of the blob
reason
Specific reason for failure
"not_found" | "network_error" | "pds_error" | "too_large"
cause?
Error
Original error (if chained)
Returns
Overrides
Properties
cause?
readonlyoptionalcause:Error
Defined in: src/types/errors.ts:71
Original error that caused this error (if any).
Remarks
Error chaining allows tracking the full error context through multiple layers of the application. Useful for debugging complex error scenarios.
Example
try {
await fetchData();
} catch (err) {
throw new ValidationError('Failed to validate data', 'field', 'required', err as Error);
}
Inherited from
cid
readonlycid:string
Defined in: src/atproto/errors/repository-errors.ts:208
CID of the blob that failed to fetch.
code
readonlycode:"BLOB_FETCH_ERROR"='BLOB_FETCH_ERROR'
Defined in: src/atproto/errors/repository-errors.ts:203
Machine-readable error code.
Remarks
Error codes are unique identifiers for error types, enabling programmatic error handling (switch statements, error maps), error tracking in monitoring systems, and client-side error translation (i18n).
Overrides
did
readonlydid:string
Defined in: src/atproto/errors/repository-errors.ts:213
DID of the repository owner.
reason
readonlyreason:"not_found"|"network_error"|"pds_error"|"too_large"
Defined in: src/atproto/errors/repository-errors.ts:218
Reason for fetch failure.