Page MenuHomePhabricator

[blob-service] Use new error types in S3 functions
ClosedPublic

Authored by bartek on Jun 6 2023, 2:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 2:18 AM
Unknown Object (File)
Tue, Dec 17, 2:18 AM
Unknown Object (File)
Tue, Dec 17, 2:17 AM
Unknown Object (File)
Tue, Dec 17, 2:13 AM
Unknown Object (File)
Sat, Dec 7, 2:13 AM
Unknown Object (File)
Wed, Dec 4, 3:27 PM
Unknown Object (File)
Nov 7 2024, 6:07 AM
Unknown Object (File)
Nov 1 2024, 9:30 AM
Subscribers

Details

Summary

Part of ENG-2398 - replaces anyhow with S3-specific error types in database functions.

Depends on D8100

Test Plan

Played with these by providing invalid inputs to S3 SDK functions (e.g. non-existing object or incorrect S3 path) - using format!("Error: {:?}", s3_error) displayed correct error types.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jun 7 2023, 2:32 AM

looks fine to me, but varun should also take a look

services/blob/src/s3.rs
185 ↗(On Diff #27454)

alternatively, you could implement From for S3Result to have it implicitly convert.

Also, not sure if logging should be done at the data layer (here), or by the calling scope. But I guess that's personal preference.

This revision is now accepted and ready to land.Jun 8 2023, 7:11 AM