Repository navigation
fix(backend): propagate opendal errors when checking for config - #640
Merged
Merged
Conversation
When checking whether the repository config file exists, the OpenDAL backend
mapped every error from `exists("config")` to "Path `config` does not exist.".
Authentication, transport, and permission failures were presented as an absent
repository, hiding the actual backend error.
Only OpenDAL's `NotFound` now means "no config"; all other errors are propagated
with their source attached. This makes failures such as `b2_authorize_account`
400 surface with their real cause instead of looking like an uninitialized repo.
How to reproduce the problem in the real world:
use a Backblaze B2 repo with a V4 API key, then run `rustic init`.
Output before:
```
[ERROR] service=b2 name= path=config: stat failed Unexpected (persistent) at stat => B2Error { status: 400, code: "bad_request", message: "This request is not currently supported on API version number 2" }
Context:
uri: https://api.backblazeb2.com/b2api/v2/b2_authorize_account
response: Parts { status: 400, version: HTTP/1.1, headers: {"strict-transport-security": "max-age=63072000", "cache-control": "max-age=0, no-cache, no-store", "content-type": "application/json;charset=utf-8", "content-length": "124", "date": "...", "connection": "close"} }
service: b2
path: config
�[0m�[0m�[1m�[31merror:�[0m `rustic_core` experienced an error related to `the backend`.
Message:
Path `config` does not exist.
```
Output now:
```
[ERROR] service=b2 name= path=config: stat failed Unexpected (persistent) at stat => B2Error { status: 400, code: "bad_request", message: "This request is not currently supported on API version number 2" }
Context:
service_operation: AuthorizeAccount
uri: https://api.backblazeb2.com/b2api/v2/b2_authorize_account
response: Parts { status: 400, version: HTTP/1.1, headers: {"strict-transport-security": "max-age=63072000", "cache-control": "max-age=0, no-cache, no-store", "content-type": "application/json;charset=utf-8", "content-length": "124", "date": "...", "connection": "close"} }
service: b2
path: config
�[0m�[0m�[1m�[31merror:�[0m `rustic_core` experienced an error related to `the backend`.
Message:
Checking for the presence of `config` in the backend failed.
```
Assisted-by: DeepSeek V4.1 Flash on Neuralwatt
aawsome
enabled auto-merge
November 5, 2026 21:46
Merged
mchobbit
pushed a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 6, 2026
…ic-rs#640) When checking whether the repository config file exists, the OpenDAL backend mapped every error from `exists("config")` to "Path `config` does not exist.". Authentication, transport, and permission failures were presented as an absent repository, hiding the actual backend error. Only OpenDAL's `NotFound` now means "no config"; all other errors are propagated with their source attached. This makes failures such as `b2_authorize_account` 400 surface with their real cause instead of looking like an uninitialized repo. How to reproduce the problem in the real world: use a Backblaze B2 repo with a V4 API key, then run `rustic init`. Output before: ``` [ERROR] service=b2 name= path=config: stat failed Unexpected (persistent) at stat => B2Error { status: 400, code: "bad_request", message: "This request is not currently supported on API version number 2" } Context: uri: https://api.backblazeb2.com/b2api/v2/b2_authorize_account response: Parts { status: 400, version: HTTP/1.1, headers: {"strict-transport-security": "max-age=63072000", "cache-control": "max-age=0, no-cache, no-store", "content-type": "application/json;charset=utf-8", "content-length": "124", "date": "...", "connection": "close"} } service: b2 path: config �[0m�[0m�[1m�[31merror:�[0m `rustic_core` experienced an error related to `the backend`. Message: Path `config` does not exist. ``` Output now: ``` [ERROR] service=b2 name= path=config: stat failed Unexpected (persistent) at stat => B2Error { status: 400, code: "bad_request", message: "This request is not currently supported on API version number 2" } Context: service_operation: AuthorizeAccount uri: https://api.backblazeb2.com/b2api/v2/b2_authorize_account response: Parts { status: 400, version: HTTP/1.1, headers: {"strict-transport-security": "max-age=63072000", "cache-control": "max-age=0, no-cache, no-store", "content-type": "application/json;charset=utf-8", "content-length": "124", "date": "...", "connection": "close"} } service: b2 path: config �[0m�[0m�[1m�[31merror:�[0m `rustic_core` experienced an error related to `the backend`. Message: Checking for the presence of `config` in the backend failed. ``` Assisted-by: DeepSeek V4.1 Flash on Neuralwatt (cherry picked from commit 01fe284)
mchobbit
added a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 6, 2026
…stic-rs#642 (not ported) 01fe284 (rustic-rs#640) is cherry-picked in the previous commit. It changes only crates/backend, which rustic-bko doesn't build, so the version stays 0.13.0+backotter.5. 18fa55c (rustic-rs#642), an HTTP connect timeout, is a feature and isn't ported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mchobbit
added a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 22, 2026
…stic_core 0.14.0, rustic_backend 0.8.0), with rustic-rs#638 and rustic-rs#611 against our chunker and zero-chunk patches (ForkAudit1 F9-01, F9-03, F9-04) Upstream released rustic_core 0.14.0 and rustic_backend 0.8.0 (bf1de63) on 2026-11-17; "Not ported" stopped at rustic-rs#640/rustic-rs#642. Now each later commit is listed with why it isn't taken: rustic-rs#638 (whole hash window prefilled: 9f88530 here does the same), rustic-rs#611 (zero chunks: chunk_id/zero_ids here do the same per file), rustic-rs#637 (chunker below a 4 KiB minimum), rustic-rs#639 (prune, breaking), rustic-rs#653, rustic-rs#648. The chunker and hole-reader paragraphs point at rustic-rs#638 and rustic-rs#611. suppaftp 10 now comes through rustic_backend 0.8.0, which needs rustic_core 0.14.0. The rebase onto 0.14.0 is recorded as pending, the user's decision; dropping our patches is D4's. Documentation only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mchobbit
pushed a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 22, 2026
## 🤖 New release * `rustic_core`: 0.13.0 -> 0.14.0 (✓ API compatible changes) * `rustic_backend`: 0.7.0 -> 0.8.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `rustic_core` <blockquote> ## [0.14.0](rustic-rs/rustic_core@rustic_core-v0.13.0...rustic_core-v0.14.0) - 2026-11-17 ### Added - count unreadable source files during backup ([rustic-rs#561](rustic-rs#561)) - impl Serialize/Deserialize and Merge for ConfigOptions ([rustic-rs#559](rustic-rs#559)) ### Fixed - *(chunker)* [**breaking**] prefill the whole rolling hash window ([rustic-rs#638](rustic-rs#638)) - *(chunker)* keep chunks within bounds for a small min size ([rustic-rs#637](rustic-rs#637)) - *(prune)* [**breaking**] Fix bug with concurrent prune runs and recovered packs ([rustic-rs#639](rustic-rs#639)) - set is_hot from the repository in init_with_config ([rustic-rs#602](rustic-rs#602)) - *(restore)* replace an entry that sits where a hardlink belongs ([rustic-rs#634](rustic-rs#634)) - *(backup)* compare inodes unless ignore_inode is set ([rustic-rs#632](rustic-rs#632)) - *(forget)* count minutes within the same hour for keep-minutely ([rustic-rs#633](rustic-rs#633)) - *(prune)* safely handle directory nodes without subtree in find_used_blobs ([rustic-rs#587](rustic-rs#587)) - *(restore)* prevent path traversal in LocalDestination ([rustic-rs#590](rustic-rs#590)) - join tree loader threads before releasing the index ([rustic-rs#607](rustic-rs#607)) - reject key files with invalid or excessive scrypt parameters ([rustic-rs#592](rustic-rs#592)) - *(packer)* validate blob offsets and bounds in BlobCopier ([rustic-rs#591](rustic-rs#591)) - don't overflow in BlobLocations::can_coalesce ([rustic-rs#589](rustic-rs#589)) - *(tree)* safely handle directory nodes without subtree in NodeStreamer and merge_nodes ([rustic-rs#588](rustic-rs#588)) - *(repair)* safely handle file nodes with missing content in repair snapshots ([rustic-rs#586](rustic-rs#586)) - don't underflow in BlobLocation::data_length ([rustic-rs#585](rustic-rs#585)) - [**breaking**] Fix clippy lints and security issues ([rustic-rs#629](rustic-rs#629)) - [**breaking**] Don't merge subpaths ([rustic-rs#563](rustic-rs#563)) - stop tree workers after receiver closes ([rustic-rs#546](rustic-rs#546)) - include path in canonicalization errors ([rustic-rs#548](rustic-rs#548)) - iOS build ([rustic-rs#553](rustic-rs#553)) - protect cache backend with locks ([rustic-rs#544](rustic-rs#544)) ### Other - update dependencies ([rustic-rs#653](rustic-rs#653)) - fix cargo-careful on main ([rustic-rs#648](rustic-rs#648)) - don't hash all-zero chunks ([rustic-rs#611](rustic-rs#611)) - compare the Debug form of the path in the sanitize error ([rustic-rs#630](rustic-rs#630)) - tidy up type parameters ([rustic-rs#580](rustic-rs#580)) - update core README credential API ([rustic-rs#549](rustic-rs#549)) </blockquote> ## `rustic_backend` <blockquote> ## [0.8.0](rustic-rs/rustic_core@rustic_backend-v0.7.0...rustic_backend-v0.8.0) - 2026-11-17 ### Added - add a connect-timeout option for http-based backends ([rustic-rs#642](rustic-rs#642)) - add a read-timeout option for http-based backends ([rustic-rs#598](rustic-rs#598)) - log OpenDAL retries as a single line ([rustic-rs#562](rustic-rs#562)) - [**breaking**] Add more reqwest options for rest+opendal backends ([rustic-rs#556](rustic-rs#556)) ### Fixed - *(prune)* [**breaking**] Fix bug with concurrent prune runs and recovered packs ([rustic-rs#639](rustic-rs#639)) - *(backend)* propagate opendal errors when checking for config ([rustic-rs#640](rustic-rs#640)) - [**breaking**] Fix clippy lints and security issues ([rustic-rs#629](rustic-rs#629)) - run delete hook when replacing a file ([rustic-rs#547](rustic-rs#547)) ### Other - update dependencies ([rustic-rs#653](rustic-rs#653)) - [**breaking**] Prefix all http transport options with http- ([rustic-rs#558](rustic-rs#558)) - add OpenDAL attribution ([rustic-rs#552](rustic-rs#552)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
mchobbit
added a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 22, 2026
…stic-rs#642 (not ported) 01fe284 (rustic-rs#640) is cherry-picked in the previous commit. It changes only crates/backend, which rustic-bko doesn't build, so the version stays 0.13.0+backotter.5. 18fa55c (rustic-rs#642), an HTTP connect timeout, is a feature and isn't ported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mchobbit
added a commit
to mchobbit/rustic_core
that referenced
this pull request
Nov 22, 2026
…stic_core 0.14.0, rustic_backend 0.8.0), with rustic-rs#638 and rustic-rs#611 against our chunker and zero-chunk patches (ForkAudit1 F9-01, F9-03, F9-04) Upstream released rustic_core 0.14.0 and rustic_backend 0.8.0 (bf1de63) on 2026-11-17; "Not ported" stopped at rustic-rs#640/rustic-rs#642. Now each later commit is listed with why it isn't taken: rustic-rs#638 (whole hash window prefilled: 9f88530 here does the same), rustic-rs#611 (zero chunks: chunk_id/zero_ids here do the same per file), rustic-rs#637 (chunker below a 4 KiB minimum), rustic-rs#639 (prune, breaking), rustic-rs#653, rustic-rs#648. The chunker and hole-reader paragraphs point at rustic-rs#638 and rustic-rs#611. suppaftp 10 now comes through rustic_backend 0.8.0, which needs rustic_core 0.14.0. The rebase onto 0.14.0 is recorded as pending, the user's decision; dropping our patches is D4's. Documentation only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When checking whether the repository config file exists, the OpenDAL backend mapped every error from
exists("config")to "Pathconfigdoes not exist.". Authentication, transport, and permission failures were presented as an absent repository, hiding the actual backend error.Only OpenDAL's
NotFoundnow means "no config"; all other errors are propagated with their source attached. This makes failures such asb2_authorize_account400 surface with their real cause instead of looking like an uninitialized repo.How to reproduce the problem in the real world:
use a Backblaze B2 repo with a V4 API key, then run
rustic init.Output before:
Output now:
Assisted-by: DeepSeek V4.1 Flash on Neuralwatt