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

Fix static file service exception on non-existing file #5230

Merged
merged 1 commit into from Sep 12, 2023

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented Sep 4, 2023

This patch fixes the problem that the static file service throws an exception when requesting a non existing file instead of returning a proper 404 NOT FOUND HTTP error code.

This fixes #5189

Your pull request should…

@lkiesow lkiesow added the bug label Sep 4, 2023
This patch fixes the problem that the static file service throws an
exception when requesting a non existing file instead of returning a
proper `404 NOT FOUND` HTTP error code.

This fixes opencast#5189
} catch (Exception e) {
logger.warn("Unable to retrieve file with uuid {}", uuid, e);
return Response.serverError().build();
} catch (NotFoundException | IOException e) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm leery of returning a 404 on an IOException, but I guess without having more details of why we're seeing that exception this is a reasonable solution.

@gregorydlogan gregorydlogan self-assigned this Sep 12, 2023
@gregorydlogan gregorydlogan merged commit d069e25 into opencast:r/13.x Sep 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants