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

502 (Bad Gateway) error trying to buy a product in test mode #38

Closed
dortamiguel opened this issue Oct 27, 2016 · 6 comments
Closed

502 (Bad Gateway) error trying to buy a product in test mode #38

dortamiguel opened this issue Oct 27, 2016 · 6 comments

Comments

@dortamiguel
Copy link

I get this error on chrome when I try to buy a new product in test mode.

image

Maybe this is because of the webpack certificate? It expired in 2015.

On firefox I don't get any error but the purchase doesn't appear on my stripe dashboard.

@christophercliff
Copy link
Owner

Looks like a legit OperationalError. The checkoutFailure action should give you a cause in the payload.

@dortamiguel
Copy link
Author

I get the following

image

@christophercliff
Copy link
Owner

That's not a very useful error message! I think this is the only place a 502 is returned:

if (err) return reject(Boom.badGateway(err.message))
. If you log that error you should get some better info.

@dortamiguel
Copy link
Author

I'm doing this but it doesn't log anything, is this what you wanted me to do?

return new Bluebird(function (resolve, reject) {
    stripeResource.create(stripePayload, function (err) {
        if (err) {
            console.log(err.message)
            return reject(Boom.badGateway(err.message))
        }
        return resolve()
    })
})

@christophercliff
Copy link
Owner

Yes, that should produce a log like 'Invalid API Key provided: sk_bogus_key'. Two things:

  1. This will be logged by the flatmarket-cli process, not the web browser console.
  2. You must restart the flatmarket-cli process after you make changes to packages/flatmarket-service.

@christophercliff
Copy link
Owner

Closing due to inactivity.

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

No branches or pull requests

2 participants