Skip to content

fix(scw): include attempted locality in resource not found errors (#1)#2944

Open
alesr wants to merge 2 commits intoscaleway:mainfrom
alesr:master
Open

fix(scw): include attempted locality in resource not found errors (#1)#2944
alesr wants to merge 2 commits intoscaleway:mainfrom
alesr:master

Conversation

@alesr
Copy link

@alesr alesr commented Feb 22, 2026

Hi team 👋

This PR fixes #2403 by adding attempted locality (zone/region) to not-found errors.

- locality is propagated from request path to error handling
- ResourceNotFoundError now includes locality (and shows it in the message)
- tests were added/updated

 - Propagate locality from request path into  hasResponseError
 - Attach locality to ResourceNotFoundError and assert behavior in tests
@alesr alesr requested review from a team and remyleone as code owners February 22, 2026 21:50
@github-actions github-actions bot added the instance Instance issues, bugs and feature requests label Feb 22, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.62%. Comparing base (25895fc) to head (1450bab).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
scw/errors.go 77.77% 3 Missing and 1 partial ⚠️
scw/client.go 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #2944      +/-   ##
=========================================
+ Coverage    3.57%   3.62%   +0.04%     
=========================================
  Files         159     159              
  Lines       51647   51668      +21     
=========================================
+ Hits         1847    1873      +26     
+ Misses      49513   49508       -5     
  Partials      287     287              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jremy42 jremy42 changed the base branch from master to main February 27, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

instance Instance issues, bugs and feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more explicit error about attempted locality when resources are missing

3 participants