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

SparkPost API - Unknown API error #339

Open
renzms opened this issue Jun 3, 2017 · 0 comments
Open

SparkPost API - Unknown API error #339

renzms opened this issue Jun 3, 2017 · 0 comments
Assignees

Comments

@renzms
Copy link
Contributor

renzms commented Jun 3, 2017

When using Comment Mail Pro Version 161213 and SparkPost as the RVE Handler the following error appears when adding RVE Error: The Comment Mail™ plugin was unable to complete the integration with SparkPost. When attempting to create an Inbound Domain the SparkPost API said: resource conflict indicating that the domain already exists in the account and cannot be used.

Changed the following code per @jaswrks 's suggestion to reveal the error code properly:

on this line


__('<strong>RVE Error '.$api_response_code.':</strong> ...

Upon changing the code and attempting again, the following code is received: RVE Error 0: The Comment Mail™ plugin was unable to complete the integration with SparkPost. When attempting to create an Inbound Domain the SparkPost API said: Unknown API error.


@jaswrks :

Notice that we already check for the error code 409 which is supposed to handle this situation, but it looks like it doesn't.
So we just need to find out what the response code is when the domain already exists and teach Comment Mail to ignore that error code.
A 0 return code indicates an all-out failure. So there's something not working quite right there in this specific scenario. If the domain already exists, instead of getting back the expected 409 HTTP status, we get 0 from the WP_Http class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant