# Failed to fetch the reposiotry details using travis ci

**URL:** https://travis-ci.community/t/failed-to-fetch-the-reposiotry-details-using-travis-ci/12669
**Category:** Enterprise
**Tags:** api
**Created:** [February 10, 2022, 10:14am UTC](https://travis-ci.community/t/failed-to-fetch-the-reposiotry-details-using-travis-ci/12669 "2022-02-10T10:14:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dasabhisek](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dasabhisek/32/7672_2.png) [@dasabhisek](https://travis-ci.community/u/dasabhisek)
#### Post date: [February 10, 2022, 10:14am UTC](https://travis-ci.community/t/failed-to-fetch-the-reposiotry-details-using-travis-ci/12669/1 "2022-02-10T10:14:07Z")

</div>

I am using below api endpoint to fetch the repository details. While trying using curl it’s working. But same not working using Ansible task.

`https://travis.example.com/api/repos/{{ ORG_NAME }}/{{ REPO_NAME }}`

Ansible Task:

```auto

 uri:
        url: "https://travis.example.com/api/repos/{{ ORG_NAME }}/{{ REPO_NAME }}"
        body_format: json
        method: GET
        follow_redirects: none
        validate_certs: false
        headers: 
         Content-Type: "application/json"
         Authorization: "token {{ access_token }}"
        status_code: [200]
      register: repo

```

Error

> “msg”: “Status code was 500 and not [200]: HTTP Error 500: Internal Server Error”,  
> “redirected”: false,  
> “server”: “cloudflare”,  
> “status”: 500,  
> “strict\_transport\_security”: “max-age=15724800; includeSubDomains”,  
> “url”: “[https://travis.example.com/api/repos/](https://travis.example.com/api/repos/)/”,  
> “x\_request\_id”: “xxxxxxxxfc3e4e3a3021d864815177”

---

<div class="post-metadata">

### Author: ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)
#### Post date: [February 10, 2022, 4:28pm UTC](https://travis-ci.community/t/failed-to-fetch-the-reposiotry-details-using-travis-ci/12669/2 "2022-02-10T16:28:57Z")

</div>

Could you please post the complete call you’re making (to reproduce the issue on our end?)
