Skip to content

log_curl_debug messages convey misleading data payloads #590

Description

@jason-matthew

json.dumps() is leveraged twice prior to writing the request's data payload.

  1. data = None if not data else dumps(data)
  2. data='' if not data else "--data '{0}'".format(dumps(data)),

Logging statements are not accurate curl statements. Note double quotes are being escaped.
2020-09-16 12:15:10,429 DEBUG curl --silent -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' --data '"{\"body\": {\"storage\": {\"representation\": \"storage\",

Using these curl statements complicates atlassian-python-api debugging given API responses convey a different error from what occurred during python execution
{"statusCode":400,"message":"Can not instantiate value of type [simple type, class com.atlassian.confluence.api.model.content.Content] from JSON String; no single-String constructor/factory method","reason":"Bad Request"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions