Skip to content

Conversation

@dynamic-entropy
Copy link
Collaborator

@dynamic-entropy dynamic-entropy commented Sep 16, 2025

This PR

  1. As per the plan to add error codes in small instalments, adds tests and mapping for File not found errors

  2. Addresses the initial bug reported in [XrdHttp] Return error instead of no reply if xrootd server is readonly #2526 - The server would erroneously skip calling SendSimpleResp if a valid mapping was missing.

  3. Introduces a consistent and exhaustive mapping between xrderr codes to http status codes via a common errno translation.

  4. Proposes a replacement for the existing (initially deemed temporary) switch case mapping to a static table lookup for WebDAV errno mapping.

Copy link
Member

@abh3 abh3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pointed out some not often used syntax in this particular context. Otherwise, I didn't see anything pop out. Of course, we need to find out why all the tests mysteriously failed.

@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch 3 times, most recently from c944a6d to 77ae366 Compare September 17, 2025 15:41
@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch 2 times, most recently from 4a8db29 to b18bfb0 Compare October 6, 2025 12:20
@dynamic-entropy dynamic-entropy marked this pull request as ready for review October 6, 2025 12:21
@dynamic-entropy dynamic-entropy requested review from abh3 and amadio October 6, 2025 12:21
@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch from b18bfb0 to 70c7195 Compare October 6, 2025 12:42
@amadio amadio linked an issue Oct 24, 2025 that may be closed by this pull request
@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch from 70c7195 to 7d1ecd6 Compare October 27, 2025 17:10
Copy link
Collaborator Author

@dynamic-entropy dynamic-entropy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted the use of l.m.n convention in error messages until we reach a consensus and a common document is shared by the WLCG to all storage technologies and clients to agree upon.

@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch from 7d1ecd6 to a671a43 Compare October 27, 2025 17:28
@dynamic-entropy
Copy link
Collaborator Author

Made a logical split between commits as per my understanding and as requested.
Also rebased on the current master.

@amadio
Copy link
Member

amadio commented Oct 27, 2025

This is now much better. I think that after adjusting the tests (x.y.z codes no longer used), and fixing some typos in comments, it will be ready to merge. Thanks a lot!

@amadio amadio force-pushed the webdav-error-improvement branch from 7d2cb57 to 6cf94fb Compare October 30, 2025 16:04
@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch 2 times, most recently from 417e7e4 to 559a20f Compare October 31, 2025 19:47
@dynamic-entropy
Copy link
Collaborator Author

@amadio
With the CI fix in ABI, this one is ready too. Along with providing a framework for consistent error reporting, it also incorporates a few bug fixes/regressions introduced in the previous error handling commits. E.g. sending 000 instead of 500 as a default response code.

This would be nice to have in 5.9.1.

For XRootD 6, we can consider going along https://www.rfc-editor.org/rfc/rfc9457.html as per your suggestion, after discussing with the other WLCG communities. Though I doubt we gain much from it other than backing from an RFC thus ending the formatting part of the discussion.

@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch from 48e338d to 559a20f Compare November 1, 2025 15:51
@amadio amadio force-pushed the webdav-error-improvement branch from 559a20f to 6318c7b Compare November 12, 2025 17:50
@amadio amadio added this to the 5.9.1 milestone Nov 12, 2025
We have the following error translation in XrootD
XrdErrno <-> errno -> HTTPStatus in xrootd.
This is to ensure that we maintain a consistent mapping for err codes
from both xrootd and linux to HTTP status codes.
code mapping consistent with current xrootd error code mappings
…ttpReq::reset()`

Not resetting it would results in wrong status codes being sent instead of the defaults
- Map XrdErrors to HTTP status codes
- Remove old error mapping
- Update XrdOssTests to allow mimic failures on read/write independently
@dynamic-entropy dynamic-entropy force-pushed the webdav-error-improvement branch from 6318c7b to c833dc7 Compare November 13, 2025 14:30
@amadio amadio merged commit ef47176 into xrootd:master Nov 13, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

WLCG DOMA, WebDAV Error Message Improvement Project

3 participants