Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: FreshdeskAPI::Error::NetworkError on export #2

Open
microbit-mark opened this issue Mar 8, 2018 · 0 comments
Open

error: FreshdeskAPI::Error::NetworkError on export #2

microbit-mark opened this issue Mar 8, 2018 · 0 comments
Labels

Comments

@microbit-mark
Copy link

All works great in terms of import to CrowdIn and downloading translated files, but I am getting an error on export to Freshdesk

here's my fci.yml

Crowdin API credentials
crowdin_project_id: 'microbit-support'
crowdin_api_key: '<api_key>'
crowdin_base_url: 'https://api.crowdin.com'

# Freshdesk API credentials
freshdesk_base_url: 'https://microbitfoundation.freshdesk.com'
freshdesk_username: '<username>
freshdesk_password: '<password>'

# Freshdesk catogories
categories:
- freshdesk_category: '19000083681'
  translations:
    -
      crowdin_language_code: 'pl'
      freshdesk_category_id: '19000083681'
    -
      crowdin_language_code: 'en-zhcn'
      freshdesk_category_id: '19000083681'

and here is the output of fci -v export

RestClient.get "https://microbitfoundation.freshdesk.com/solution/categories/19000083681", "Accept"=>"application/json", "Accept-Encoding"=>"gzip ,deflate", "Content-Type"=>"application/json", "User-Agent"=>"FreshdeskAPI API 0.1.3"
# => 200 OK | application/json 324 bytes
[Freshdesk] Create new Folder `Getting Started` for language `pl`.
warning: Overriding "Content-Type" header "application/json" with "application/x-www-form-urlencoded" due to payload
RestClient.post "https://microbitfoundation.freshdesk.com/solution/categories/19000083681/folders", "solution_folder[category_id]=19000083681&solution_folder[name]=Getting+Started&solution_folder[description]=&solution_folder[visibility]=1", "Accept"=>"application/json", "Accept-Encoding"=>"gzip ,deflate", "Content-Length"=>"138", "Content-Type"=>"application/x-www-form-urlencoded", "User-Agent"=>"FreshdeskAPI API 0.1.3"
# => 422 UnprocessableEntity | application/json 60 bytes
error: FreshdeskAPI::Error::NetworkError
Traceback (most recent call last):
	19: from /Users/mark/.rbenv/versions/2.5.0/bin/fci:23:in `<main>'
	18: from /Users/mark/.rbenv/versions/2.5.0/bin/fci:23:in `load'
	17: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/bin/fci:95:in `<top (required)>'
	16: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/gli-2.13.0/lib/gli/app_support.rb:83:in `run'
	15: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/gli-2.13.0/lib/gli/app_support.rb:309:in `call_command'
	14: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/gli-2.13.0/lib/gli/app_support.rb:296:in `block in call_command'
	13: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/gli-2.13.0/lib/gli/command_support.rb:126:in `execute'
	12: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:34:in `block (2 levels) in <top (required)>'
	11: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:34:in `each'
	10: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:35:in `block (3 levels) in <top (required)>'
	 9: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:35:in `each'
	 8: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:68:in `block (4 levels) in <top (required)>'
	 7: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:68:in `each'
	 6: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fci-0.0.6/lib/fci/commands/04_export.rb:110:in `block (5 levels) in <top (required)>'
	 5: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/actions.rb:91:in `create!'
	 4: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/actions.rb:91:in `tap'
	 3: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/actions.rb:92:in `block in create!'
	 2: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/actions.rb:61:in `save!'
	 1: from /Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/client.rb:58:in `make_request!'
/Users/mark/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/freshdesk_api-0.1.3/lib/freshdesk_api/client.rb:75:in `rescue in make_request!': FreshdeskAPI::Error::NetworkError (FreshdeskAPI::Error::ClientError)
@mamantoha mamantoha added the bug label Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants