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

[Lethal Company] tcli publish category errors #99

Open
KlutzyBubbles opened this issue Dec 11, 2023 · 4 comments
Open

[Lethal Company] tcli publish category errors #99

KlutzyBubbles opened this issue Dec 11, 2023 · 4 comments

Comments

@KlutzyBubbles
Copy link

Trying to publish a mod with the categories ["mods", "serverside", "clientside", "tools"] and the communities ["lethal-company"] and getting the error

ERROR: Unexpected response from the server while publishing package:
Status code: 400 BadRequest
{"categories":{"1":["Object not found"],"2":["Object not found"]}}
Exiting

This happens on 0.2.1, 0.2.2 and 0.2.3. Not sure if i am just using the incorrect categories or if there is something that is going wrong. I tried looking through the code but i am unfamiliar with where i would find anything.

@Lordfirespeed
Copy link
Contributor

You are using the incorrect categories, yes - 'object not found' is because that list can only contain 'global' categories, not community-specific ones, and serverside and clientside (indexes 1,2) are not global categories.

You should do something like this:

[publish]
communities = ["foo", "bar"]

[publish.categories]
foo = ["mods", "foo-category-1", "foo-category-2"]
bar = ["mods", "bar-category-1", "bar-category-2"]

@Lordfirespeed
Copy link
Contributor

It should be said, though - the error message could be seriously improved.

@MythicManiac
Copy link
Member

MythicManiac commented Dec 12, 2023

...that list can only contain 'global' categories

They're actually not even global, but rather the categories of the domain-bound community (domains have a "main community" since previously each community had their own domain; we're still migrating away from that).

Doesn't make a significant difference in practice, just wanted to clarify

@Lordfirespeed
Copy link
Contributor

Thankyou for clarifying! I wasn't sure where they came from / what their proper name was 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants