Skip to content

Commit

Permalink
fix: report carCid as string to sentry (#2072)
Browse files Browse the repository at this point in the history
dont report it as a CID object, as they look whack. e.g.

<img width="879" alt="Screenshot 2022-10-27 at 11 32 06"
src="https://user-images.githubusercontent.com/58871/198262007-0b1c5480-2f4e-4c37-ad53-d3ec46bec051.png">


License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
  • Loading branch information
olizilla committed Oct 27, 2022
1 parent 7a60fd4 commit 5f55e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/car.js
Expand Up @@ -121,7 +121,7 @@ export async function handleCarUpload (request, env, ctx, car, uploadType = 'Car
const carCid = CID.createV1(CAR_CODE, await sha256.digest(carBytes))
const s3Key = `raw/${sourceCid}/${user._id}/${toString(carCid.multihash.bytes, 'base32')}.car`
const r2Key = `${carCid}/${carCid}.car`
env.sentry?.setExtras({ sourceCid, carCid, dagSize, structure, s3Key, r2Key })
env.sentry?.setExtras({ sourceCid, carCid: carCid.toString(), dagSize, structure, s3Key, r2Key })

await Promise.all([
putToS3(env, s3Key, carBytes, carCid, sourceCid, structure),
Expand Down

0 comments on commit 5f55e32

Please sign in to comment.