Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the reason why decoding fails for AbstractStreamDecoder #5177

Open
jrhee17 opened this issue Sep 7, 2023 · 0 comments · May be fixed by #5620
Open

Expose the reason why decoding fails for AbstractStreamDecoder #5177

jrhee17 opened this issue Sep 7, 2023 · 0 comments · May be fixed by #5620
Labels
defect sprint Issues for OSS Sprint participants

Comments

@jrhee17
Copy link
Contributor

jrhee17 commented Sep 7, 2023

When running the failing tests in following pull request, I noticed that AbstractStreamDecoder#decode silently ignores the failure to decode messages.

#5174 (review)
https://github.com/line/armeria/actions/runs/6092788681/job/16531491206?pr=5174#step:9:3015

We are silently ignoring exceptions at this point:

try {
decoder.writeInbound(obj.byteBuf());
} catch (DecompressionException ex) {
final String message = ex.getMessage();
if (message != null && message.startsWith("Decompression buffer has reached maximum size:")) {
throw ContentTooLargeException.builder()
.maxContentLength(maxLength)
.cause(ex)
.build();
}
}
return fetchDecoderOutput();

We probably want to let the caller know a decoding failure has been done instead of silently ignoring and returning an empty result.

@jrhee17 jrhee17 added the defect label Sep 7, 2023
@jrhee17 jrhee17 added the sprint Issues for OSS Sprint participants label Apr 1, 2024
@Be-poz Be-poz linked a pull request Apr 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect sprint Issues for OSS Sprint participants
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant