Skip to content

Add more details into Update email error #14

@dimitrystd

Description

@dimitrystd

I got exception during updating email. My email contains about 10 sections and this error doesn't help me at all in troubleshooting.

com.smartling.marketo.sdk.MarketoApiException: htmlID specified is not valid 
at com.smartling.marketo.sdk.rest.transport.HttpCommandExecutor.execute(HttpCommandExecutor.java:67) ~[marketo-sdk-2.0.18.jar:na] at com.smartling.marketo.sdk.rest.MarketoRestClient.updateEmailContent(MarketoRestClient.java:85) ~[marketo-sdk-2.0.18.jar:na]

We should add more details into exception, not just wrap marketo exception.

DoD:
Add more details for updating email content request - print keys and values of command. Values can be really long, let's trim them to first 15 characters with ellipsis.
An example:

com.smartling.marketo.sdk.MarketoApiException: htmlID specified is not valid at.
Command: UpdateEmailEditableSection
path="/asset/v1/email/1339/content/edit_text_body.json"
type="Text"
value="<strong>Hello bro..."
textValue="Hello brother"

Don't forged to enclose values in quotes to make friendly for splunk indexing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions