fb_error_machine 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/scrape_fb_errors +5 -0
- data/bin/scrape_fb_graph_api_errors +6 -0
- data/bin/scrape_fb_marketing_api_errors +5 -0
- data/fb_error_machine.gemspec +31 -0
- data/lib/fb_error_machine.rb +32 -0
- data/lib/fb_error_machine/error_base.rb +11 -0
- data/lib/fb_error_machine/error_writer.rb +30 -0
- data/lib/fb_error_machine/graph_api_error.rb +23 -0
- data/lib/fb_error_machine/graph_api_errors.yml +76 -0
- data/lib/fb_error_machine/graph_error_scraper.rb +32 -0
- data/lib/fb_error_machine/marketing_api_error.rb +23 -0
- data/lib/fb_error_machine/marketing_api_error_scraper.rb +24 -0
- data/lib/fb_error_machine/marketing_api_errors.yml +211 -0
- data/lib/fb_error_machine/version.rb +3 -0
- metadata +111 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e6a0e103328a7f1bc1e33027d0d52fd5f9a53c48
|
4
|
+
data.tar.gz: 0e4d38f030dae1d4c499579d4c670e87d6ba3b7a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 879b62ad53a379d2b8566e5f81d506f94ed77247fff14e531ee9a14860b5e92e1b52e6bba3f407e7b5d58b4c28b4a82cc74451a5f134f6ea675e1231b81b0628
|
7
|
+
data.tar.gz: ea7224388fada63a2c8e594a1756d0feff7bd25de82ab4bc0baec9c79e0a0000d7d62eb18d78eb31d4661d383d152c105e80f75fad284f52d6f1f8dbf6ef3400
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# FbErrorMachine
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fb_error_machine`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'fb_error_machine'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install fb_error_machine
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fb_error_machine.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'fb_error_machine/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "fb_error_machine"
|
8
|
+
spec.version = FbErrorMachine::VERSION
|
9
|
+
spec.authors = ["Corey Psoinos"]
|
10
|
+
spec.email = ["coreypsoinos@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A glossary for Facebook error codes.}
|
13
|
+
spec.description = %q{A simple scraper to pull Facebook's list of error codes and descriptions from the documentation.}
|
14
|
+
spec.homepage = "https://github.com/cpsoinos/fb_error_machine"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "bin"
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
27
|
+
|
28
|
+
# ["scrape_fb_errors", "scrape_fb_graph_api_errors", "scrape_fb_marketing_api_errors"].each do |executable|
|
29
|
+
# spec.executables << executable
|
30
|
+
# end
|
31
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'fb_error_machine/marketing_api_error_scraper'
|
3
|
+
require 'fb_error_machine/graph_error_scraper'
|
4
|
+
require 'fb_error_machine/error_writer'
|
5
|
+
require 'fb_error_machine/error_base'
|
6
|
+
require 'fb_error_machine/marketing_api_error'
|
7
|
+
require 'fb_error_machine/graph_api_error'
|
8
|
+
|
9
|
+
module FbErrorMachine
|
10
|
+
|
11
|
+
class Scraper
|
12
|
+
|
13
|
+
def scrape_graph_api_errors(version="2.7")
|
14
|
+
puts "Begin Graph API Error list from 'https://developers.facebook.com/docs/graph-api/using-graph-api/v#{version}'"
|
15
|
+
GraphErrorScraper.scrape_graph_api_errors
|
16
|
+
puts "Stored Graph API Errors"
|
17
|
+
end
|
18
|
+
|
19
|
+
def scrape_marketing_api_errors(version="2.7")
|
20
|
+
puts "Begin scraping Marketing API Error list from 'https://developers.facebook.com/docs/marketing-api/error-reference/v#{version}'"
|
21
|
+
MarketingApiErrorScraper.scrape_marketing_api_errors
|
22
|
+
puts "Stored Marketing API Errors"
|
23
|
+
end
|
24
|
+
|
25
|
+
def scrape(version="2.7")
|
26
|
+
scrape_graph_api_errors(version)
|
27
|
+
scrape_marketing_api_errors(version="2.7")
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module FbErrorMachine
|
2
|
+
class ErrorWriter
|
3
|
+
|
4
|
+
def self.write_errors(attrs)
|
5
|
+
type = attrs.delete(:type)
|
6
|
+
errors = attrs[:errors]
|
7
|
+
|
8
|
+
store_path = "lib/fb_error_machine/#{type}_api_errors.yml"
|
9
|
+
File.open(store_path, 'w') {|f| f.write errors.to_yaml }
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.find_error_code(row)
|
13
|
+
sanitize(row.tds.first.inner_html)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find_description(row)
|
17
|
+
dirty_html = row.tds.to_a[1].inner_html
|
18
|
+
sanitize(dirty_html)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.find_instructions(row)
|
22
|
+
sanitize(row.tds[2].inner_html)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.sanitize(html)
|
26
|
+
Sanitize.fragment(html).strip.gsub("\n", "").gsub(" ", " ")
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module FbErrorMachine
|
2
|
+
|
3
|
+
class GraphApiError < ErrorBase
|
4
|
+
|
5
|
+
attr_accessor :error_code, :description, :instructions
|
6
|
+
|
7
|
+
def self.all
|
8
|
+
@_errors ||= begin
|
9
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "graph_api_errors.yml")).map do |entry|
|
10
|
+
GraphApiError.new(entry)
|
11
|
+
end
|
12
|
+
rescue Psych::SyntaxError, Errno::EACCES, Errno::ENOENT
|
13
|
+
{}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.find(error_code)
|
18
|
+
GraphApiError.all.detect { |e| e.error_code == error_code.to_s }
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
- :error_code: OAuthException
|
3
|
+
:description: ''
|
4
|
+
:instructions: If no subcode is present, this means that the login status or access
|
5
|
+
token has expired, been revoked, or is otherwise invalid. Get a new access token.
|
6
|
+
If a subcode is present, see the subcode.
|
7
|
+
- :error_code: '102'
|
8
|
+
:description: API Session
|
9
|
+
:instructions: If no subcode is present, this means that the login status or access
|
10
|
+
token has expired, been revoked, or is otherwise invalid. Get a new access token.
|
11
|
+
If a subcode is present, see the subcode.
|
12
|
+
- :error_code: '1'
|
13
|
+
:description: API Unknown
|
14
|
+
:instructions: Possibly a temporary issue due to downtime. Wait and retry the operation.
|
15
|
+
If it occurs again, check you are requesting an existing API.
|
16
|
+
- :error_code: '2'
|
17
|
+
:description: API Service
|
18
|
+
:instructions: Temporary issue due to downtime. Wait and retry the operation.
|
19
|
+
- :error_code: '4'
|
20
|
+
:description: API Too Many Calls
|
21
|
+
:instructions: Temporary issue due to throttling. Wait and retry the operation,
|
22
|
+
or examine your API request volume.
|
23
|
+
- :error_code: '17'
|
24
|
+
:description: API User Too Many Calls
|
25
|
+
:instructions: Temporary issue due to throttling. Wait and retry the operation,
|
26
|
+
or examine your API request volume.
|
27
|
+
- :error_code: '10'
|
28
|
+
:description: API Permission Denied
|
29
|
+
:instructions: Permission is either not granted or has been removed. Handle the
|
30
|
+
missing permissions.
|
31
|
+
- :error_code: '190'
|
32
|
+
:description: Access token has expired
|
33
|
+
:instructions: Get a new access token.
|
34
|
+
- :error_code: 200-299
|
35
|
+
:description: API Permission (Multiple values depending on permission)
|
36
|
+
:instructions: Permission is either not granted or has been removed. Handle the
|
37
|
+
missing permissions.
|
38
|
+
- :error_code: '341'
|
39
|
+
:description: Application limit reached
|
40
|
+
:instructions: Temporary issue due to downtime or throttling. Wait and retry the
|
41
|
+
operation, or examine your API request volume.
|
42
|
+
- :error_code: '368'
|
43
|
+
:description: Temporarily blocked for policies violations
|
44
|
+
:instructions: Wait and retry the operation.
|
45
|
+
- :error_code: '506'
|
46
|
+
:description: Duplicate Post
|
47
|
+
:instructions: Duplicate posts cannot be published consecutively. Change the content
|
48
|
+
of the post and try again.
|
49
|
+
- :error_code: '1609005'
|
50
|
+
:description: Error Posting Link
|
51
|
+
:instructions: There was a problem scraping data from the provided link. Check the
|
52
|
+
URL and try again.
|
53
|
+
- :error_code: '458'
|
54
|
+
:description: App Not Installed
|
55
|
+
:instructions: The user has not logged into your app. Reauthenticate the user.
|
56
|
+
- :error_code: '459'
|
57
|
+
:description: User Checkpointed
|
58
|
+
:instructions: The user needs to log in at https://www.facebook.com or https://m.facebook.com
|
59
|
+
to correct an issue.
|
60
|
+
- :error_code: '460'
|
61
|
+
:description: Password Changed
|
62
|
+
:instructions: On iOS 6 and above, if the person logged in using the OS-integrated
|
63
|
+
flow, they should be directed to Facebook OS settings on the device to update
|
64
|
+
their password. Otherwise, they must login to the app again.
|
65
|
+
- :error_code: '463'
|
66
|
+
:description: Expired
|
67
|
+
:instructions: Login status or access token has expired, been revoked, or is otherwise
|
68
|
+
invalid. Handle expired access tokens.
|
69
|
+
- :error_code: '464'
|
70
|
+
:description: Unconfirmed User
|
71
|
+
:instructions: The user needs to log in at https://www.facebook.com or https://m.facebook.com
|
72
|
+
to correct an issue.
|
73
|
+
- :error_code: '467'
|
74
|
+
:description: Invalid access token
|
75
|
+
:instructions: Access token has expired, been revoked, or is otherwise invalid.
|
76
|
+
Handle expired access tokens.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module FbErrorMachine
|
2
|
+
class GraphErrorScraper
|
3
|
+
|
4
|
+
def self.scrape_graph_api_errors(version="2.7")
|
5
|
+
browser = Watir::Browser.new :phantomjs
|
6
|
+
browser.goto("https://developers.facebook.com/docs/graph-api/using-graph-api/v#{version}")
|
7
|
+
|
8
|
+
error_table = browser.table(xpath: '//*[@id="u_0_0"]/div/span/div/div[8]/div/div[1]/table')
|
9
|
+
error_rows = error_table.rows.to_a
|
10
|
+
error_rows.shift
|
11
|
+
|
12
|
+
auth_table = browser.table(xpath: '//*[@id="u_0_0"]/div/span/div/div[8]/div/div[2]/table')
|
13
|
+
auth_rows = auth_table.rows.to_a
|
14
|
+
auth_rows.shift
|
15
|
+
|
16
|
+
rows = error_rows + auth_rows
|
17
|
+
errors = []
|
18
|
+
|
19
|
+
rows.each do |row|
|
20
|
+
errors << {
|
21
|
+
error_code: ErrorWriter.find_error_code(row),
|
22
|
+
description: ErrorWriter.find_description(row),
|
23
|
+
instructions: ErrorWriter.find_instructions(row),
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
browser.close
|
28
|
+
ErrorWriter.write_errors(type: 'graph', errors: errors)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module FbErrorMachine
|
2
|
+
|
3
|
+
class MarketingApiError < ErrorBase
|
4
|
+
|
5
|
+
attr_accessor :error_code, :description, :instructions
|
6
|
+
|
7
|
+
def self.all
|
8
|
+
@_errors ||= begin
|
9
|
+
YAML.load_file(File.join(File.dirname(__FILE__), "marketing_api_errors.yml")).map do |entry|
|
10
|
+
GraphApiError.new(entry)
|
11
|
+
end
|
12
|
+
rescue Psych::SyntaxError, Errno::EACCES, Errno::ENOENT
|
13
|
+
{}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.find(error_code)
|
18
|
+
MarketingApiError.all.detect { |e| e.error_code == error_code.to_s }
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module FbErrorMachine
|
2
|
+
class MarketingApiErrorScraper
|
3
|
+
|
4
|
+
def self.scrape_marketing_api_errors(version="2.7")
|
5
|
+
browser = Watir::Browser.new :phantomjs
|
6
|
+
browser.goto("https://developers.facebook.com/docs/marketing-api/error-reference/v#{version}")
|
7
|
+
rows = browser.trs.to_a
|
8
|
+
rows.shift
|
9
|
+
|
10
|
+
errors = []
|
11
|
+
|
12
|
+
rows.each do |row|
|
13
|
+
errors << {
|
14
|
+
error_code: ErrorWriter.find_error_code(row),
|
15
|
+
description: ErrorWriter.find_description(row),
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
browser.close
|
20
|
+
ErrorWriter.write_errors(type: 'marketing', errors: errors)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,211 @@
|
|
1
|
+
---
|
2
|
+
- :error_code: '1'
|
3
|
+
:description: An unknown error occurred
|
4
|
+
- :error_code: '4'
|
5
|
+
:description: Application request limit reached
|
6
|
+
- :error_code: '10'
|
7
|
+
:description: Application does not have permission for this action
|
8
|
+
- :error_code: '17'
|
9
|
+
:description: User request limit reached
|
10
|
+
- :error_code: '100'
|
11
|
+
:description: Invalid parameter
|
12
|
+
- :error_code: '102'
|
13
|
+
:description: Session key invalid or no longer valid
|
14
|
+
- :error_code: '104'
|
15
|
+
:description: Incorrect signature
|
16
|
+
- :error_code: '190'
|
17
|
+
:description: Invalid OAuth 2.0 Access Token
|
18
|
+
- :error_code: '200'
|
19
|
+
:description: Permission error
|
20
|
+
- :error_code: '294'
|
21
|
+
:description: Managing advertisements requires the extended permission ads_management
|
22
|
+
and an application that is whitelisted to access the Marketing API
|
23
|
+
- :error_code: '2606'
|
24
|
+
:description: Unable to display a preview of this ad
|
25
|
+
- :error_code: '2607'
|
26
|
+
:description: The given currency is invalid for usage with ads.
|
27
|
+
- :error_code: '2615'
|
28
|
+
:description: Invalid call to update this adaccount
|
29
|
+
- :error_code: '5000'
|
30
|
+
:description: Unknown Error Code
|
31
|
+
- :error_code: '1349118'
|
32
|
+
:description: One or more of the given URLs is not allowed by the Stream post URL
|
33
|
+
security app setting. It must match the Website URL or Canvas URL, or the domain
|
34
|
+
must be a subdomain of one of the App's domains. Read more about Login Security
|
35
|
+
to learn more about app settings related to security.
|
36
|
+
- :error_code: '1359036'
|
37
|
+
:description: 'Ad Create Failed - Too Many Ads: The account {account_id} has reached
|
38
|
+
the maximum number of ads {max}'
|
39
|
+
- :error_code: '1359102'
|
40
|
+
:description: 'Invalid Parameter In Spec: Parameter has invalid value or missing
|
41
|
+
required parameter: {param-value}'
|
42
|
+
- :error_code: '1487006'
|
43
|
+
:description: 'Invalid Campaign ID: You must specify a campaign, and the campaign
|
44
|
+
specified must belong to the account specified and must not be deleted.'
|
45
|
+
- :error_code: '1487007'
|
46
|
+
:description: 'Campaign Ended: You can''t edit ads in a campaign that has ended.
|
47
|
+
Please create a new ad within this campaign, update the campaign end time, pick
|
48
|
+
another campaign, or create a new campaign.'
|
49
|
+
- :error_code: '1487010'
|
50
|
+
:description: 'Ad Bid Too High: Your bid is above the maximum for its type and placement.
|
51
|
+
Please try again with a value below the maximum if you would like to raise your
|
52
|
+
bid.'
|
53
|
+
- :error_code: '1487013'
|
54
|
+
:description: 'Bid Too Low: Your bid is below the minimum for its placement and
|
55
|
+
type. If you don''t want your ad to run at the minimum bid rate, please pause
|
56
|
+
it. Otherwise, please increase the bid to be within the suggested range.'
|
57
|
+
- :error_code: '1487014'
|
58
|
+
:description: Campaign budget was too low. Please increase the daily budget to at
|
59
|
+
least 2 times the amount of the highest CPC ad bid, which is at least {minimum_budget}.
|
60
|
+
You bid {bid}.
|
61
|
+
- :error_code: '1487015'
|
62
|
+
:description: The ad creative is invalid
|
63
|
+
- :error_code: '1487065'
|
64
|
+
:description: 'Ad Missing Targeting Spec: Ad spec needs a targeting spec. Please
|
65
|
+
use targeting field to specify what audience the ad should be shown to. Field
|
66
|
+
''countries'' is required; all others are optional.'
|
67
|
+
- :error_code: '1487087'
|
68
|
+
:description: 'Ad Create Failed: The Ad Create Failed for the following reason:
|
69
|
+
{reason}'
|
70
|
+
- :error_code: '1487089'
|
71
|
+
:description: 'Target Spec Invalid: The target spec is invalid: {reason}'
|
72
|
+
- :error_code: '1487090'
|
73
|
+
:description: 'Ad Edit Failed - Spec Errors: {error}'
|
74
|
+
- :error_code: '1487108'
|
75
|
+
:description: 'Invalid Cities: Please check that the format in which you are specify
|
76
|
+
the cities is correct, and if you specify ids, that they are of the correct type
|
77
|
+
(not, for example, the id of the page for the city; city ids are returned by,
|
78
|
+
e.g., graph.facebook.com/search?type=adcity).'
|
79
|
+
- :error_code: '1487124'
|
80
|
+
:description: 'Invalid Connection: You can only specify connections to objects you
|
81
|
+
are an administrator or developer of.'
|
82
|
+
- :error_code: '1487133'
|
83
|
+
:description: 'Invalid Negative Connections: If you specify negative targeting,
|
84
|
+
you must be the administrator or developer of the objects whose fans you want
|
85
|
+
to specify to exclude. You are not an admin of the following specified connections:
|
86
|
+
{connections}'
|
87
|
+
- :error_code: '1487172'
|
88
|
+
:description: Could not save creative
|
89
|
+
- :error_code: '1487174'
|
90
|
+
:description: 'Invalid Image Hash: Invalid Image Hash - {hash}'
|
91
|
+
- :error_code: '1487194'
|
92
|
+
:description: 'Permission Error: Either the object you are trying to access is not
|
93
|
+
visible to you or the action you are trying to take is restricted to certain account
|
94
|
+
types.'
|
95
|
+
- :error_code: '1487199'
|
96
|
+
:description: 'Ad targeting does not match targeting of the story: The targeting
|
97
|
+
specified for this ad is not compatible with the story being boosted. Check the
|
98
|
+
privacy and language/country targeting of the story you are trying to sponsor.'
|
99
|
+
- :error_code: '1487202'
|
100
|
+
:description: 'Invalid object - not admin or object not public: The user is not
|
101
|
+
an admin of the object or the object is not publicly accessible.'
|
102
|
+
- :error_code: '1487211'
|
103
|
+
:description: 'Invalid URL For Creative Destination: Creative must have a valid
|
104
|
+
destination URL, and if attached object is page, destination must match page.'
|
105
|
+
- :error_code: '1487225'
|
106
|
+
:description: 'Ad Creation Limited By Daily Spend: The number of ads you can create
|
107
|
+
in a given period of time has a limit determined by your daily spend level. Higher
|
108
|
+
spend levels allow creation of more ads. Increase your daily spend limit or create
|
109
|
+
fewer ads per time period.'
|
110
|
+
- :error_code: '1487244'
|
111
|
+
:description: 'Campaign Update Failed: Campaign {campaign_id}: {reason}'
|
112
|
+
- :error_code: '1487246'
|
113
|
+
:description: 'Campaign Creation Failed: {reason}'
|
114
|
+
- :error_code: '1487256'
|
115
|
+
:description: 'Targeting declined due to policy: Invalid ads targeting. The targeting
|
116
|
+
spec was declined due to policy restrictions.'
|
117
|
+
- :error_code: '1487283'
|
118
|
+
:description: 'Not Allowed To Use View Tags: Only some partners are allowed to use
|
119
|
+
view tags. Please verify that you are using an approved account.'
|
120
|
+
- :error_code: '1487301'
|
121
|
+
:description: 'Custom Audience Unavailable: The custom audience you''re trying to
|
122
|
+
use hasn''t been shared with your ad account. Please create or choose a different
|
123
|
+
custom audience, or ask the owner of the custom audience to let you use it.'
|
124
|
+
- :error_code: '1487346'
|
125
|
+
:description: 'The post does not belong to the specified Page: Post to be promoted
|
126
|
+
does not belong to the Page specified. The post belongs to {otherDestination};
|
127
|
+
try using this as the destination or using a post that belongs to the specified
|
128
|
+
Page. Specified Page: {destination}.'
|
129
|
+
- :error_code: '1487366'
|
130
|
+
:description: 'Custom Audience Has Been Deleted: Cannot use deleted custom audience.
|
131
|
+
Please choose another audience.'
|
132
|
+
- :error_code: '1487376'
|
133
|
+
:description: 'Conversion Spec Needed: For ads pointing to an offsite location with
|
134
|
+
a non-zero bid on actions, you must specify the conversion spec.'
|
135
|
+
- :error_code: '1487380'
|
136
|
+
:description: Invalid aggregation day for conversion data. The aggregation day must
|
137
|
+
be larger than or equal to 1.
|
138
|
+
- :error_code: '1487390'
|
139
|
+
:description: 'Adcreative Create Failed: The Adcreative Create Failed for the following
|
140
|
+
reason: {reason}'
|
141
|
+
- :error_code: '1487391'
|
142
|
+
:description: 'Cannot Use Syndicated Audiences From Multiple Partners: When specifying
|
143
|
+
partner-created custom audiences for an ad, all audiences must be from the same
|
144
|
+
provider.'
|
145
|
+
- :error_code: '1487396'
|
146
|
+
:description: 'Failed to update the creative: Failed to update creative {id}. Failed
|
147
|
+
for the following reason: {reason}'
|
148
|
+
- :error_code: '1487424'
|
149
|
+
:description: 'Ad Needs Exclusion Targeting: This ad cannot be created with the
|
150
|
+
targeting spec you selected. Your ad has a conversion objective that users can
|
151
|
+
only do once, so you must target the ad at those users who have not already converted.
|
152
|
+
If you are using the Facebook API, consider including the following string in
|
153
|
+
your targeting spec: {exclusion-targeting-spec}.'
|
154
|
+
- :error_code: '1487465'
|
155
|
+
:description: 'Invalid CPA Bid: The action type you selected is not allowed for
|
156
|
+
Cost-Per-Action (CPA) bidding: ''{action_type}''. Please change your optimization
|
157
|
+
goal or switch your bid type to regular Optimized CPM.'
|
158
|
+
- :error_code: '1487472'
|
159
|
+
:description: This type of page post is not eligible to be promoted. {debug_info}
|
160
|
+
- :error_code: '1487477'
|
161
|
+
:description: 'Conversion Tracking Pixel Permission Error: The conversion tracking
|
162
|
+
pixel you''re trying to use is owned by another user and hasn''t been shared with
|
163
|
+
you. Please use a tracking pixel that''s been shared with you or create a new
|
164
|
+
one.'
|
165
|
+
- :error_code: '1487485'
|
166
|
+
:description: Too many async requests
|
167
|
+
- :error_code: '1487506'
|
168
|
+
:description: 'The new budget value is too low: The new budget value of {new_budget}
|
169
|
+
is too low. The minimum acceptable is {minimum_budget}.'
|
170
|
+
- :error_code: '1487557'
|
171
|
+
:description: No supported fields were provided for updating the campaign
|
172
|
+
- :error_code: '1487558'
|
173
|
+
:description: No supported fields were provided for updating the ad
|
174
|
+
- :error_code: '1487559'
|
175
|
+
:description: Ad Update Failed {reason}
|
176
|
+
- :error_code: '1487573'
|
177
|
+
:description: You must specify an object_id for this adcreative type (creative type
|
178
|
+
27)
|
179
|
+
- :error_code: '1487742'
|
180
|
+
:description: There have been too many calls from this ad-account. Wait a bit and
|
181
|
+
try again.
|
182
|
+
- :error_code: '1487756'
|
183
|
+
:description: You have overlapping locations specified in the geo_locations field.
|
184
|
+
Your broader option will override the narrower option, please remove one to proceed.
|
185
|
+
- :error_code: '1487790'
|
186
|
+
:description: 'The promoted object is invalid: it could have been deleted or never
|
187
|
+
existed.'
|
188
|
+
- :error_code: '1487881'
|
189
|
+
:description: The given prediction id in a reach and frequency campaign is not reserved.
|
190
|
+
- :error_code: '1487882'
|
191
|
+
:description: The given reservation in a reach and frequency campaign is not finalized
|
192
|
+
yet.
|
193
|
+
- :error_code: '1487884'
|
194
|
+
:description: The given reservation in a reach and frequency campaign is already
|
195
|
+
finalized
|
196
|
+
- :error_code: '1487885'
|
197
|
+
:description: The prediction in a reach and frequency campaign is already reserved.
|
198
|
+
- :error_code: '1487886'
|
199
|
+
:description: This indicates the operation fails for an unknown reason.
|
200
|
+
- :error_code: '1487887'
|
201
|
+
:description: The given page types are not supported by the inventory manager.
|
202
|
+
- :error_code: '1487915'
|
203
|
+
:description: A finalized prediction order can not be cancelled. You can create
|
204
|
+
a new prediction or delete the campaign.
|
205
|
+
- :error_code: '1634013'
|
206
|
+
:description: 'Conversion Spec Targets Invalid ID: You are targeting an ID in your
|
207
|
+
conversion spec without admin permissions on that object. {debug_info}'
|
208
|
+
- :error_code: '1667002'
|
209
|
+
:description: 'This Promotion Can''t Be Edited: This can''t be edited because you
|
210
|
+
promoted it from your Page. Find the post on your Page to pause, delete, or update
|
211
|
+
budget for this promotion.'
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fb_error_machine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Corey Psoinos
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
description: A simple scraper to pull Facebook's list of error codes and descriptions
|
56
|
+
from the documentation.
|
57
|
+
email:
|
58
|
+
- coreypsoinos@gmail.com
|
59
|
+
executables:
|
60
|
+
- scrape_fb_errors
|
61
|
+
- scrape_fb_graph_api_errors
|
62
|
+
- scrape_fb_marketing_api_errors
|
63
|
+
extensions: []
|
64
|
+
extra_rdoc_files: []
|
65
|
+
files:
|
66
|
+
- ".gitignore"
|
67
|
+
- ".rspec"
|
68
|
+
- ".travis.yml"
|
69
|
+
- Gemfile
|
70
|
+
- LICENSE.txt
|
71
|
+
- README.md
|
72
|
+
- Rakefile
|
73
|
+
- bin/scrape_fb_errors
|
74
|
+
- bin/scrape_fb_graph_api_errors
|
75
|
+
- bin/scrape_fb_marketing_api_errors
|
76
|
+
- fb_error_machine.gemspec
|
77
|
+
- lib/fb_error_machine.rb
|
78
|
+
- lib/fb_error_machine/error_base.rb
|
79
|
+
- lib/fb_error_machine/error_writer.rb
|
80
|
+
- lib/fb_error_machine/graph_api_error.rb
|
81
|
+
- lib/fb_error_machine/graph_api_errors.yml
|
82
|
+
- lib/fb_error_machine/graph_error_scraper.rb
|
83
|
+
- lib/fb_error_machine/marketing_api_error.rb
|
84
|
+
- lib/fb_error_machine/marketing_api_error_scraper.rb
|
85
|
+
- lib/fb_error_machine/marketing_api_errors.yml
|
86
|
+
- lib/fb_error_machine/version.rb
|
87
|
+
homepage: https://github.com/cpsoinos/fb_error_machine
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.5.1
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: A glossary for Facebook error codes.
|
111
|
+
test_files: []
|