Skip to content

SparkPost API - Unknown API error #339

@renzms

Description

@renzms

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions