HomePhabricator
Diffusion Comm 629559dad170

[backup] Introduce backup error

Description

[backup] Introduce backup error

Summary:
ENG-4380

Catch-all error for all errors that will be able to come up during handling of backup requests. For now it only has errors for blob client, but it will be expanded in the future diffs.

Test Plan:
Create a service:

.service(web::resource("/hello").route(web::get().to(
       |blob: web::Data<BlobServiceClient>| async move {
         let _ = blob.get("asdasd").await.map_err(BackupError::from)?;
         Ok::<&str, BackupError>("world")
       },
     )))

Test a few different scenarios: blob error not available (not running), blob not existing

Reviewers: bartek, patryk, jon

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8952

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Aug 17 2023, 4:06 AM
Reviewer
bartek
Differential Revision
D8952: [backup] Introduce backup error
Parents
rCOMM758d5a4d6450: [services-lib][blob-client] Use Bytes instead of Vec<u8>
Branches
Unknown
Tags
Unknown