Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is the payload when I am sending in the pile pointer:
- {:name=>"new template - Ruby", :folder=>"{\"id\":2836,\"type\":\"Folder\"}", :content=>#<File:/Users/jbrodie/projects/mongoose/script/testFile.html>, :description=>"Email Template created by Ruby"}
- And it dies with:
- `to_json_with_active_support_encoder': stack level too deep (SystemStackError)
- But when I submit it with string content for the template:
- {: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"}
- The request package is as follows:
- #<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)>>
- It throes the system error, with no more explanation to it.
- This is the output debug for the data:
- 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
- D, [2015-09-29T14:34:26.679460 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
- I, [2015-09-29T14:34:28.513610 #26931] INFO -- Status: 200
- D, [2015-09-29T14:34:28.513829 #26931] DEBUG -- response: server: "nginx"
- date: "Tue, 29 Sep 2015 18:34:28 GMT"
- content-type: "application/json;charset=UTF-8"
- transfer-encoding: "chunked"
- connection: "close"
- cache-control: "no-store"
- pragma: "no-cache"
- set-cookie: "BIGipServersjgcp-restapi_https=XXXXXXXXXXXXX.47873.0000; path=/"
- 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
- D, [2015-09-29T14:34:28.514793 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
- Authorization: "Bearer XXXXXXXXXXXXXXXX:sj"
- I, [2015-09-29T14:34:28.970786 #26931] INFO -- Status: 200
- D, [2015-09-29T14:34:28.971001 #26931] DEBUG -- response: server: "nginx"
- date: "Tue, 29 Sep 2015 18:34:28 GMT"
- content-type: "application/json;charset=UTF-8"
- transfer-encoding: "chunked"
- connection: "close"
- set-cookie: "BIGipServersjgcp-restapi_https=XXXXXXXXXXXXX.47873.0000; path=/"
- I, [2015-09-29T14:34:28.971866 #26931] INFO -- : post https://685-ZUA-702.mktorest.com/rest/asset/v1/emailTemplates.json
- D, [2015-09-29T14:34:28.972011 #26931] DEBUG -- request: User-Agent: "Faraday v0.9.1"
- Authorization: "Bearer XXXXXXXXXXXXXXX:sj"
- Content-Type: "multipart/form-data"
- /Users/jbrodie/projects/mrkt/lib/mrkt/faraday_middleware/response.rb:25:in `handle_errors!': System error (Mrkt::Errors::System)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement