# HTTP 500/400 Errors when publishing collections

**URL:** <https://forum.ansible.com/t/http-500-400-errors-when-publishing-collections/2380>\
**Category:** Get Help\
**Tags:** collections, galaxy-ng\
**Created:** [November 14, 2023, 8:01pm UTC](https://forum.ansible.com/t/http-500-400-errors-when-publishing-collections/2380 "2023-11-14T20:01:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonyskapunk](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tonyskapunk/32/1435_2.png) [@tonyskapunk](https://forum.ansible.com/u/tonyskapunk)\
**Post date:** [November 14, 2023, 8:01pm UTC](https://forum.ansible.com/t/http-500-400-errors-when-publishing-collections/2380/1 "2023-11-14T20:01:42Z")

</div>

Hola!

I’m publishing a collection through galaxy using a GitHub Action (GHA). Lately, I did a change in the version (most likely the cause of the problem) and since, I haven’t been able to see the import task URL, likely because I’m seeing a 500 error first and subsequently a 400 telling me that the collection already exists 😆

Here an example of the [GHA where I get the 500](https://github.com/tonyskapunk/beat-ansible-collection/actions/runs/6868409652/job/18678869668)

```auto
Created collection for tonyskapunk.beat at /github/workspace/tonyskapunk-beat-1.2.1699989185+202311141913.gitc0825d0.tar.gz
ERROR! Error when publishing collection to cmd_arg (https://galaxy.ansible.com/api/) (HTTP Code: 500, Message: Internal Server Error Code: Unknown)
No config file found; using defaults
Publishing collection artifact '/github/workspace/tonyskapunk-beat-1.2.1699989185+202311141913.gitc0825d0.tar.gz' to cmd_arg https://galaxy.ansible.com/api/

```

The strange part to me is the first `500` error, while it fails it seems like the collection is imported and published despite the error.

Just in case here the a [subsequent GHA execution with the 400](https://github.com/tonyskapunk/beat-ansible-collection/actions/runs/6868593351/job/18679505693)

Any help is appreciated as I would like to understand what is causing the error.

Thanks!

---

<div class="post-metadata">

**Author:** ![tonyskapunk](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tonyskapunk/32/1435_2.png) [@tonyskapunk](https://forum.ansible.com/u/tonyskapunk)\
**Post date:** [November 14, 2023, 10:52pm UTC](https://forum.ansible.com/t/http-500-400-errors-when-publishing-collections/2380/2 "2023-11-14T22:52:41Z")

</div>

Ended up opening a bug in galaxy for this [Publishing collection with certain version returns a 500 error · Issue #3287 · ansible/galaxy · GitHub](https://github.com/ansible/galaxy/issues/3287)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 14, 2023, 10:53pm UTC](https://forum.ansible.com/t/http-500-400-errors-when-publishing-collections/2380/3 "2023-12-14T22:53:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
