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

Making akka-http FormData return 413 instead of 500, delete failed files #159

Merged
merged 5 commits into from Jan 12, 2019

Conversation

Projects
None yet
1 participant
@blast-hardcheese
Copy link
Collaborator

blast-hardcheese commented Jan 11, 2019

Resolves #143

This moves the exception handler up before the route -- the exception handler was previously not used due to being in the wrong place.

Additionally, calling dest.delete() immediately upon any exception, to avoid the condition where an exception happens inside UnmarshalToFile, preventing the file handle from being added to the AtomicReference[List[File]]s to clean up.

@blast-hardcheese blast-hardcheese force-pushed the blast-hardcheese:issue-143 branch 2 times, most recently from 69fb6db to 3b37d87 Jan 12, 2019

@blast-hardcheese blast-hardcheese force-pushed the blast-hardcheese:issue-143 branch from 3b37d87 to 84af0c7 Jan 12, 2019

@blast-hardcheese

This comment has been minimized.

Copy link
Collaborator

blast-hardcheese commented Jan 12, 2019

Needed to work around akka/akka-http#2381 in the test

@blast-hardcheese blast-hardcheese merged commit 14c8cec into twilio:master Jan 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@blast-hardcheese blast-hardcheese deleted the blast-hardcheese:issue-143 branch Jan 12, 2019

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