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: handled errors on /upload endpoint #21

Merged
merged 1 commit into from
Feb 16, 2023
Merged

Conversation

Creatoon
Copy link
Contributor

Fixed #16

  1. Closed the pipe from req to bus boy as If any error occurs, we will stop feeding the data.

  2. I offloaded the work of each event (field, file) to work queue, such that if any error occurs then we can pause the processing queue and and finally prevent the bus boy events from firing callbacks on the data that has already been piped.

@Creatoon Creatoon merged commit f73b8ff into metacall:master Feb 16, 2023
@durgesh077
Copy link

@Creatoon what about already written files like metacall_json to the disk , You need to delete after error. I was doing first like this but later falled back to try catch to handle sending all the possible errors .

@Creatoon
Copy link
Contributor Author

@durgesh077 we are not writing any json file to the disk at the time of package creation, it happens in the deploying phase.

Also, anything will only be written to the disk once callback fired by busboy runs successfully.

If there will be any error all the data will be flushed out as it's in the memory.

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.

server crash on illformatted metadata json
2 participants