Comments (12)
Can you print the response out without doing inspect + raising? And could you check the type of what's returned?
from ruby-sdk.
when i do a "puts response.body" I get:
{"subscription_plan_id":1029356427}
I added the following code to debug insidewepay.rb:
puts "Call: #{call}"
puts "Response: #{response}"
puts "Response.body: #{response.body}"
puts "Response.http_version: #{response.http_version}"
puts "Response.message: #{response.message}"
puts "Response.code: #{response.code}"
And this is what i get :
DESTROYING SUBSCRIPTION
Call: #Net::HTTP::Post:0x007f8ec9564cf8
Response: #Net::HTTPInternalServerError:0x007f8ec9574108
Response.body:
Response.http_version: 1.1
Response.message: Internal Server Error
Response.code: 500
Call: #Net::HTTP::Post:0x007f8ec958edf0
Response: #Net::HTTPOK:0x007f8ec959d8c8
Response.body: {"subscription_plan_id":548391780,"state":"Deleted"}
Response.http_version: 1.1
Response.message: OK
Response.code: 200
Not sure why i'm getting two calls there?
On Sep 15, 2014, at 5:55 PM, Scott Feinberg [email protected] wrote:
Can you print the response out without doing inspect + raising? And could you check the type of what's returned?
—
Reply to this email directly or view it on GitHub.
from ruby-sdk.
What's weird is that none of the IDs match up...
@vasusen what do you think?
from ruby-sdk.
Im creating and deleting a subscription each time i run a test
On Sep 15, 2014, at 6:18 PM, Scott Feinberg [email protected] wrote:
What's weird is that none of the IDs match up...
@vasusen what do you think?
—
Reply to this email directly or view it on GitHub.
from ruby-sdk.
I'm wondering if there's a race condition here. Can you add a 10 second
wait after you create?
On Mon, Sep 15, 2014 at 4:24 PM, robmomary [email protected] wrote:
Im creating and deleting a subscription each time i run a test
On Sep 15, 2014, at 6:18 PM, Scott Feinberg [email protected]
wrote:What's weird is that none of the IDs match up...
@vasusen what do you think?
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).
from ruby-sdk.
I can - but i got the same response after i did a delete in the app (not testing) - the record had been created a while ago
On Sep 15, 2014, at 6:26 PM, Scott Feinberg [email protected] wrote:
I'm wondering if there's a race condition here. Can you add a 10 second
wait after you create?On Mon, Sep 15, 2014 at 4:24 PM, robmomary [email protected] wrote:
Im creating and deleting a subscription each time i run a test
On Sep 15, 2014, at 6:18 PM, Scott Feinberg [email protected]
wrote:What's weird is that none of the IDs match up...
@vasusen what do you think?
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).—
Reply to this email directly or view it on GitHub.
from ruby-sdk.
Just trying to rule out the 500 error
On Mon, Sep 15, 2014 at 4:29 PM, robmomary [email protected] wrote:
I can - but i got the same response after i did a delete in the app (not
testing) - the record had been created a while agoOn Sep 15, 2014, at 6:26 PM, Scott Feinberg [email protected]
wrote:I'm wondering if there's a race condition here. Can you add a 10 second
wait after you create?On Mon, Sep 15, 2014 at 4:24 PM, robmomary [email protected]
wrote:Im creating and deleting a subscription each time i run a test
On Sep 15, 2014, at 6:18 PM, Scott Feinberg <
[email protected]>
wrote:What's weird is that none of the IDs match up...
@vasusen what do you think?
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).
from ruby-sdk.
Hey there,
I just added "sleep 10" before the call, got this:
DESTROYING SUBSCRIPTION
Call: #Net::HTTP::Post:0x007f8ed2a8e180
Response: #Net::HTTPInternalServerError:0x007f8ed2a95368
Response.body:
Response.http_version: 1.1
Response.message: Internal Server Error
Response.code: 500
Call: #Net::HTTP::Post:0x007f8ed2aa7e28
Response: #Net::HTTPOK:0x007f8ed2ab5d70
Response.body: {"subscription_plan_id":456914568,"state":"Deleted"}
Response.http_version: 1.1
Response.message: OK
Response.code: 200
On Sep 15, 2014, at 6:30 PM, Scott Feinberg [email protected] wrote:
Just trying to rule out the 500 error
On Mon, Sep 15, 2014 at 4:29 PM, robmomary [email protected] wrote:
I can - but i got the same response after i did a delete in the app (not
testing) - the record had been created a while agoOn Sep 15, 2014, at 6:26 PM, Scott Feinberg [email protected]
wrote:I'm wondering if there's a race condition here. Can you add a 10 second
wait after you create?On Mon, Sep 15, 2014 at 4:24 PM, robmomary [email protected]
wrote:Im creating and deleting a subscription each time i run a test
On Sep 15, 2014, at 6:18 PM, Scott Feinberg <
[email protected]>
wrote:What's weird is that none of the IDs match up...
@vasusen what do you think?
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#9 (comment).—
Reply to this email directly or view it on GitHub.
from ruby-sdk.
any update on this?
from ruby-sdk.
Sorry for the delay here-had to dive into this. While it correctly deletes the subscription, there appears to be a bug on our side that's returning 500. We're working on a fix and will let you know once it's resolved. The SDK is retrying after it gets 500 the first time, which is what you're seeing.
Sorry about that! Will let you know once we have a resolution.
from ruby-sdk.
ping :)
from ruby-sdk.
Getting the same error when I make a call to '/user'
> WEPAY.call('/user', wepay_access_token)
JSON::ParserError: A JSON text must at least contain two octets!
from /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `new'
from /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/wepay-0.0.3/lib/wepay.rb:60:in `call'
from (irb):23
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.5/lib/rails/commands/console.rb:90:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.5/lib/rails/commands/console.rb:9:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:69:in `console'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
from ruby-sdk.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-sdk.