title: Facebook API - Insights: Status: 500, error code 1, "An unknown error occurred" at random times
body: <p>Of the late when trying to fetch data from FB's Marketing API, I get following error:</p>
  
  <blockquote>
  <pre><code>  Status:  500
    Response:
      {
        "error": {
          "code": 1,
          "message": "An unknown error occurred"
        }
      }
  </code></pre>
  </blockquote>
  
  <p>at times. If I try to immediately make the same request via Postman, it returns data at times and at times throws 500 status error.
  Below is the data being sent to FB</p>
  
  <pre><code>  facebookads.exceptions.FacebookRequestError:
  
    Message: Call was not successful
    Method:  GET
    Path:    https://graph.facebook.com/v2.3/act_XYZ/insights
    Params: {
        'time_increment': 1,
        'level': 'adgroup',
        'fields': '["account_name", "deeplink_clicks",
                    "campaign_name",
                    "social_impressions",
                    "campaign_group_name",
                    "campaign_id",
                    "adgroup_name",
                    "unique_impressions",
                    "social_reach",
                    "unique_social_impressions",
                    "placement",
                    "total_actions",
                    "cpm",
                    "impressions",
                    "ctr",
                    "reach",
                    "clicks",
                    "social_clicks",
                    "spend",
                    "website_clicks",
                    "adgroup_id",
                    "actions",
                    "cpc",
                    "cpp",
                    "unique_clicks",
                    "app_store_clicks",
                    "unique_social_clicks",
                    "account_id",
                    "campaign_group_id"
                ]',
    'breakdowns': '["placement"]',
    'time_range': '{"since":"2015-09-01","until":"2015-09-09"}',
    'summary': None
    }
  
    Status:  500
    Response:
      {
        "error": {
          "code": 1,
          "message": "An unknown error occurred"
        }
      }
  </code></pre>
  
  <p>I am using Facebook's Python SDK from </p>
  
  <blockquote>
    <p>-e git+<a href="https://github.com/pythonforfacebook/facebook-sdk.git@449f56f0db086a41bedd23df714e7f77c1051f5b#egg=facebook_sdk-dev" rel="nofollow">https://github.com/pythonforfacebook/facebook-sdk.git@449f56f0db086a41bedd23df714e7f77c1051f5b#egg=facebook_sdk-dev</a></p>
  </blockquote>
  
  <p>Can someone please let me know what I might be missing in this case?</p>
  
  <p>Thanks.</p>