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

check content-type on handleAdd early #653

Merged
merged 6 commits into from
Dec 6, 2022
Merged

Conversation

anjor
Copy link
Contributor

@anjor anjor commented Dec 5, 2022

I was trying to upload a large dataset and it failed after nearly 7 minutes because I had the wrong content-type in my request:

root@c3-small-x86-01:/data# time curl https://upload.estuary.tech/content/add -H "Authorization: Bearer $(cat /data/.estuary_auth)" -H "Content-Type: multipar/form-data" -F "data=@longitudinal-nutrient-deficiency.tar"
{"error":{"code":500,"reason":"Internal Server Error","details":"request Content-Type isn't multipart/form-data"}}

real	6m52.221s
user	0m15.953s
sys	0m18.861s

Checking it early to handle similar instances.

handlers.go Outdated Show resolved Hide resolved
util/content.go Outdated Show resolved Hide resolved
handlers.go Outdated Show resolved Hide resolved
cmd/estuary-shuttle/main.go Outdated Show resolved Hide resolved
en0ma
en0ma previously approved these changes Dec 6, 2022
Copy link
Contributor

@en0ma en0ma left a comment

Choose a reason for hiding this comment

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

LGTM

@anjor anjor merged commit 719782c into dev Dec 6, 2022
LucRoy added a commit that referenced this pull request Dec 6, 2022
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.

None yet

2 participants