Skip to content

Return proper error codes instead of NewInternal - #5781

Open
btwshivam wants to merge 7 commits into
cs3org:masterfrom
btwshivam:review-internal-errors
Open

Return proper error codes instead of NewInternal#5781
btwshivam wants to merge 7 commits into
cs3org:masterfrom
btwshivam:review-internal-errors

Conversation

@btwshivam

@btwshivam btwshivam commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #4915.
NewInternal() was used as a catch-all across the grpc services and flattened errors that already carried a code (notfound, permission denied, ...) into INTERNAL. routes those through NewStatusFromErrType so the real code reaches the client, adds the inverse NewErrtypeFromStatus for the gateway helpers that receive a downstream status and fixes a few miscoded BadRequests

also i see there are genuinely internal sites (transport failures, marshaling, client setup) i left them as-it-is

Signed-off-by: btwshivam <shivam.devline@gmail.com>
Signed-off-by: btwshivam <shivam.devline@gmail.com>
Signed-off-by: btwshivam <shivam.devline@gmail.com>
Signed-off-by: btwshivam <shivam.devline@gmail.com>
Signed-off-by: btwshivam <shivam.devline@gmail.com>
@btwshivam
btwshivam force-pushed the review-internal-errors branch from f41ab60 to dddcf2a Compare August 17, 2026 23:50
Signed-off-by: btwshivam <shivam.devline@gmail.com>
Signed-off-by: btwshivam <shivam.devline@gmail.com>
@btwshivam
btwshivam marked this pull request as ready for review August 19, 2026 20:07
@btwshivam

Copy link
Copy Markdown
Contributor Author

@glpatcern Please take a look when you get a chance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review all internal errors

1 participant