File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,19 +34,19 @@ export class CarBlockGetter {
34
34
const { value, done } = await promiseTimeout (
35
35
this . carItr . next ( ) ,
36
36
this . getBlockTimeout ,
37
- new TimeoutError ( `get block ${ cid } timed out` )
37
+ new TimeoutError ( `get ${ cid } : timed out` )
38
38
)
39
39
40
40
if ( ! value && done ) {
41
- throw new VerificationError ( ' CAR file has no more blocks.' )
41
+ throw new VerificationError ( `get ${ cid } : CAR file has no more blocks` )
42
42
}
43
43
44
44
const { cid : blockCid , bytes } = value
45
45
await verifyBlock ( blockCid , bytes )
46
46
47
47
if ( ! cid . equals ( blockCid ) ) {
48
48
throw new VerificationError (
49
- `received block with cid ${ blockCid } , expected ${ cid } `
49
+ `get ${ cid } : received ${ blockCid } instead `
50
50
)
51
51
}
52
52
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ describe('CAR Verification', () => {
115
115
} ,
116
116
{
117
117
name : 'VerificationError' ,
118
- message : 'CAR file has no more blocks. '
118
+ message : 'get bafybeidhkumeonuwkebh2i4fc7o7lguehauradvlk57gzake6ggjsy372a: CAR file has no more blocks'
119
119
}
120
120
)
121
121
} )
@@ -155,7 +155,7 @@ describe('CAR Verification', () => {
155
155
{
156
156
name : 'VerificationError' ,
157
157
message :
158
- 'received block with cid bafybeidhkumeonuwkebh2i4fc7o7lguehauradvlk57gzake6ggjsy372a, expected bafybeigeqgfwhivuuxgmuvcrrwvs4j3yfzgljssvnuqzokm6uby4fpmwsa '
158
+ 'get bafybeigeqgfwhivuuxgmuvcrrwvs4j3yfzgljssvnuqzokm6uby4fpmwsa: received bafybeidhkumeonuwkebh2i4fc7o7lguehauradvlk57gzake6ggjsy372a instead '
159
159
}
160
160
)
161
161
} )
You can’t perform that action at this time.
0 commit comments