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

s3 fail detector #59

Closed
wants to merge 1 commit into from
Closed

s3 fail detector #59

wants to merge 1 commit into from

Conversation

xtat
Copy link
Contributor

@xtat xtat commented Feb 14, 2012

Not sure how you'd like to do this! Ran into s3 fails on a production app!

@domenic
Copy link
Contributor

domenic commented Jul 16, 2012

I agree that all the higher-level API functions should check for 2xx or 3xx status codes, and if not, return an error. Perhaps they should even read in the response body as the error message.

This particular implementation isn't great, as it only applies to putStream (which needs an overhaul anyway), doesn't account for other 2xx or 3xx successes, and throws away the failure information. But the impetus is sound, so I'll leave it open as a reminder.

@domenic
Copy link
Contributor

domenic commented Jul 18, 2012

Here is how Dynode implements it:

/~https://github.com/Wantworthy/dynode/blob/c29ab5c5a110c86f82329f49289647cd7a057bc9/lib/dynode/request.js#L41-54

They have the luxury of getting JSON back instead of XML, of course. Also we'd have to be sure not to just check for 200, but for 2xx as well (e.g. 201 on PUT).

@tim-kos
Copy link

tim-kos commented Jul 27, 2012

It would also be cool to be able to provide more events on the http request, like on('close') and on('clientError').

We also got S3 fails in production and since these events are not thrown/handled, we ran into an uncaught exception. : /

@domenic
Copy link
Contributor

domenic commented Jul 27, 2012

@tim-kos: I don't think http.ClientRequest emits "clientError", and "close" is not an error condition, so I don't see why we would listen for that...

@tim-kos
Copy link

tim-kos commented Aug 2, 2012

Sorry, I meant on('error').

@domenic
Copy link
Contributor

domenic commented Aug 2, 2012

@tim-kos
Copy link

tim-kos commented Aug 2, 2012

Okay thank you. I missed those.

@domenic
Copy link
Contributor

domenic commented Aug 2, 2012

Ok, just let me know if you do spot anything Knox can do to help with your unhandled exceptions :)

On Aug 2, 2012, at 10:30, "Tim Koschuetzki" reply@reply.github.com wrote:

Okay thank you. I missed those.


Reply to this email directly or view it on GitHub:
#59 (comment)

@boutell
Copy link
Contributor

boutell commented Sep 30, 2012

Shouldn't the 307 code be implemented by trying again automatically at the suggested URL?

@domenic
Copy link
Contributor

domenic commented Sep 30, 2012

@boutell yes, that is a feature we would like to add, see #66.

@domenic
Copy link
Contributor

domenic commented Nov 5, 2012

Closed in favor of #114

@domenic domenic closed this Nov 5, 2012
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.

5 participants