dosubot[bot] commented on issue #7051:
URL: https://github.com/apache/opendal/issues/7051#issuecomment-3664000782

   <!-- Answer -->
   This change in error kind from `NotFound` (in 0.55.0) to `PermissionDenied` 
(in rev 02953ef) for statting a non-existent S3 file is likely related to 
recent updates in how OpenDAL interprets S3 error responses. OpenDAL 
intentionally maps some S3/OSS 404 errors to `PermissionDenied` when it 
suspects the 404 is due to insufficient permissions, since S3 returns 404 for 
both missing objects and permission errors. This mapping is meant to avoid 
confusion but can lead to cases like yours if the logic is too broad or 
aggressive [[issue #990](https://github.com/apache/opendal/issues/990)].
   
   If you expect `NotFound` for missing files, this may be a regression or an 
unintended side effect of the recent error handling changes. You might want to 
review recent commits around S3 error mapping, or consider opening a targeted 
issue if you believe this is not the intended behavior. Monitoring future 
releases or discussions for updates on error kind handling in stat operations 
is also recommended.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/ed52c2fa-5a52-4513-a947-09134b4dcdcd?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/997a2c5a-0c54-497b-989d-44651635dd36/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20change%20in%20error%20kind%20from%20%60NotFound%60%20%28in%200.55.0%29%20to%20%60PermissionDenied%60%20%28in%20rev%2002953ef%29%20for%20statting%20a%20non-existent%20S3%20file%20is%20likely%20related%20to%20recent%20updates%20in%20how%20OpenDAL%20interprets%20S3%20error%20responses.%20OpenDAL%20intentionally%20maps%20some%20S3/OSS%20404%20errors%20to%20%60PermissionDenied%60%20when%20it%20suspects%20the%20404%20is%20due%20to%20insufficient%20permissions%2C%20since%20S3%20returns%20404%20for%20both%20missing%20objects%20and%20permission%20errors.%20This%20mapping%20is%20meant%20to%20avoid%20confusion%20but%20can%20lead%20to%20cases%20like%20yours%20if%20the%20logic%20is%20too%20broad%20or%20aggressive%20%5B%5Bissue%20%23990%5D%28https%3A//git
 
hub.com/apache/opendal/issues/990%29%5D.%0A%0AIf%20you%20expect%20%60NotFound%60%20for%20missing%20files%2C%20this%20may%20be%20a%20regression%20or%20an%20unintended%20side%20effect%20of%20the%20recent%20error%20handling%20changes.%20You%20might%20want%20to%20review%20recent%20commits%20around%20S3%20error%20mapping%2C%20or%20consider%20opening%20a%20targeted%20issue%20if%20you%20believe%20this%20is%20not%20the%20intended%20behavior.%20Monitoring%20future%20releases%20or%20discussions%20for%20updates%20on%20error%20kind%20handling%20in%20stat%20operations%20is%20also%20recommended.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/opendal/issues/7051)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to