Guest User

Untitled

a guest
Sep 29th, 2015
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This is the payload when I am sending in the pile pointer:
  2. {:name=>"new template - Ruby", :folder=>"{\"id\":2836,\"type\":\"Folder\"}", :content=>#<File:/Users/jbrodie/projects/mongoose/script/testFile.html>, :description=>"Email Template created by Ruby"}
  3.  
  4. And it dies with:
  5. `to_json_with_active_support_encoder': stack level too deep (SystemStackError)
  6.  
  7. But when I submit it with string content for the template:
  8. {:name=>"new template - Ruby", :folder=>"{\"id\":2836,\"type\":\"Folder\"}", :content=>"<!DOCTYPE html>\n<html>\n<body>\n\n<h1>My First Heading</h1>\n\n<p>My first paragraph.</p>\n\n</body>\n</html>\n", :description=>"Email Template created by Ruby"}
  9.  
  10. The request package is as follows:
  11. #<struct Faraday::Request method=:post, path="/rest/asset/v1/emailTemplates.json", params={}, headers={"User-Agent"=>"Faraday v0.9.1", "Authorization"=>"Bearer 48ee073a-9bc5-4b14-85bf-f402bbd55107:sj", "Content-Type"=>"multipart/form-data"}, body={}, options=#<Faraday::RequestOptions (empty)>>
  12.  
  13. It throes the system error, with no more explanation to it.
  14.  
  15. This is the output debug for the data:
  16.  
  17. I, [2015-09-29T14:34:26.678995 #26931] INFO -- : get https://685-ZUA-702.mktorest.com/identity/oauth/token?client_id=XXXXXXXXXXX&client_secret=XXXXXXXXXXXXXXXX&grant_type=client_credentials
  18. D, [2015-09-29T14:34:26.679460 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
  19. I, [2015-09-29T14:34:28.513610 #26931] INFO -- Status: 200
  20. D, [2015-09-29T14:34:28.513829 #26931] DEBUG -- response: server: "nginx"
  21. date: "Tue, 29 Sep 2015 18:34:28 GMT"
  22. content-type: "application/json;charset=UTF-8"
  23. transfer-encoding: "chunked"
  24. connection: "close"
  25. cache-control: "no-store"
  26. pragma: "no-cache"
  27. set-cookie: "BIGipServersjgcp-restapi_https=XXXXXXXXXXXXX.47873.0000; path=/"
  28. I, [2015-09-29T14:34:28.514653 #26931] INFO -- : get https://685-ZUA-702.mktorest.com/rest/asset/v1/folder/byName.json?name=Software+Reviews
  29. D, [2015-09-29T14:34:28.514793 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
  30. Authorization: "Bearer XXXXXXXXXXXXXXXX:sj"
  31. I, [2015-09-29T14:34:28.970786 #26931] INFO -- Status: 200
  32. D, [2015-09-29T14:34:28.971001 #26931] DEBUG -- response: server: "nginx"
  33. date: "Tue, 29 Sep 2015 18:34:28 GMT"
  34. content-type: "application/json;charset=UTF-8"
  35. transfer-encoding: "chunked"
  36. connection: "close"
  37. set-cookie: "BIGipServersjgcp-restapi_https=XXXXXXXXXXXXX.47873.0000; path=/"
  38. I, [2015-09-29T14:34:28.971866 #26931] INFO -- : post https://685-ZUA-702.mktorest.com/rest/asset/v1/emailTemplates.json
  39. D, [2015-09-29T14:34:28.972011 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
  40. Authorization: "Bearer XXXXXXXXXXXXXXX:sj"
  41. Content-Type: "multipart/form-data"
  42. /Users/jbrodie/projects/mrkt/lib/mrkt/faraday_middleware/response.rb:25:in `handle_errors!': System error (Mrkt::Errors::System)
RAW Paste Data