Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

handle file metadata extraction failure gracefully #670

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

abhinavkgrd
Copy link
Member

@abhinavkgrd abhinavkgrd commented Jul 26, 2022

Description

https://sentry.ente.io/organizations/ente/issues/2571/?project=2&query=is%3Aunresolved&statsPeriod=14d

added try-catch block to prevent metadata extraction error to bubble up and cause complete extractFileTypeAndMetadata to fail and just log and return null as the value for metadata

and later in the uploader the file will be rejected accordingly with the error NO_METADATA instead of Cannot read properties of null (reading 'fileType')

Test Plan

tested locally

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 26, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: cc48cd8
Status: ✅  Deploy successful!
Preview URL: https://de51998f.bada-frame.pages.dev
Branch Preview URL: https://handle-file-hash-generation-.bada-frame.pages.dev

View logs

rushitote
rushitote previously approved these changes Jul 27, 2022
@abhinavkgrd
Copy link
Member Author

@rushitote resolved merge conflicts

@abhinavkgrd abhinavkgrd merged commit e224083 into main Jul 27, 2022
@abhinavkgrd abhinavkgrd deleted the handle-file-hash-generation-failed-gracefully branch July 27, 2022 09:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants