Skip to content

Commit 586d88a

Browse files
authored
Merge pull request #1240 from corbob/add-http-codes
(#426) Add Common Errors page
2 parents 2f303f9 + 95d09ed commit 586d88a

File tree

3 files changed

+87
-41
lines changed

3 files changed

+87
-41
lines changed

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,8 @@
149149
"uninstall-chocolateyzippackage",
150150
"update-sessionenvironment",
151151
"write-functioncalllogmessage"
152-
]
153-
}
152+
],
153+
"files.associations": {
154+
"*.mdx": "markdown"
155+
},
156+
}

src/content/docs/en-us/community-repository/faq.mdx

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Callout from '@choco-astro/components/Callout.astro';
88
import Iframe from '@choco-astro/components/Iframe.astro';
99
import Xref from '@components/Xref.astro';
1010

11-
### How Do I Ask Questions About a Package?
11+
## How Do I Ask Questions About a Package?
1212

1313
If you have a question about the _package_, please follow **both** these steps:
1414

@@ -17,13 +17,13 @@ If you have a question about the _package_, please follow **both** these steps:
1717

1818
![Package Source link on the Chocolatey Community Repository package page](https://img.chocolatey.org/docs/automatic-packages/triage-packagesource.jpg)
1919

20-
### How Do I Ask Questions About the Package Software?
20+
## How Do I Ask Questions About the Package Software?
2121

2222
If you have questions about the _software_ the package installs, please contact the Software Vendor/Author. Maintainers do not provide support for the software that is packaged.
2323

2424
If you want to ask questions about the _package_, see [here](#how-do-i-ask-questions-about-a-package).
2525

26-
### How Do I Contact the Package Maintainers?
26+
## How Do I Contact the Package Maintainers?
2727

2828
You may want to contact the package maintainers with package questions, or to report a broken or outdated package. On the [Chocolatey Community Repository](https://community.chocolatey.org/packages) package page, click the **Contact Maintainers** link.
2929

@@ -33,7 +33,7 @@ If your question is about the software installed by the package, please contact
3333

3434
![Package Maintainers profile links on the Chocolatey Community Repository](https://img.chocolatey.org/docs/faqs/triage-maintainerlinks.jpg)
3535

36-
### How Do I Contact the Site Admins?
36+
## How Do I Contact the Site Admins?
3737

3838
You should contact the Site Admins if:
3939

@@ -52,11 +52,11 @@ To contact the Site Admins, click the **Contact Site Admins** link to contact th
5252

5353
![Contact Site Admins link on the Chocolatey Community Repository package page](https://img.chocolatey.org/docs/automatic-packages/triage-siteadmins.jpg)
5454

55-
### How Do I Create Chocolatey Packages?
55+
## How Do I Create Chocolatey Packages?
5656

5757
It's easy to <Xref title="create and maintain packages" value="create-packages" />.
5858

59-
### How Do I Find the Package Source?
59+
## How Do I Find the Package Source?
6060

6161
On the [Chocolatey Community Repository](https://community.chocolatey.org/packages) package page, click the **Package Source** link, if it's available.
6262

@@ -67,7 +67,7 @@ Not all Maintainers provide a publicly accessible package source. If the **Packa
6767
![Package Maintainers profile links on the Chocolatey Community Repository](https://img.chocolatey.org/docs/faqs/triage-maintainerlinks.jpg)
6868
![Package Maintainer profile on the Chocolatey Community Repository with GitHub repository link](https://img.chocolatey.org/docs/faqs/triage-maintainerrepository.jpg)
6969

70-
### How Do I Inspect the Contents of a Chocolatey Package?
70+
## How Do I Inspect the Contents of a Chocolatey Package?
7171

7272
<Callout type="info">
7373
Packages submitted before 2014 do not have files listed under the **Files** section.
@@ -81,23 +81,23 @@ You can also download the actual package and inspect the contents. On the left m
8181

8282
![Download package button on the Chocolatey Community Repository](https://img.chocolatey.org/docs/faqs/triage-download.jpg)
8383

84-
### How Do I See All Versions Of a Package
84+
## How Do I See All Versions Of a Package
8585

8686
Packages can have multiple version, both stable and prerelease. All of these versions are listed on the package page and can be found by scrolling down the page to the **Version History** section and clicking the link.
8787

8888
![Version History section of the package page on the Chocolatey Community Repository](https://img.chocolatey.org/docs/faqs/packagepage-versionhistory.jpg)
8989

9090
Only a limited number are shown initially. If there are more version available, click the **Show Additional Versions** button to view them all.
9191

92-
### How Do I See the Package Source Code?
92+
## How Do I See the Package Source Code?
9393

9494
See [this FAQ question](#how-do-i-find-the-package-source).
9595

96-
### How To Report An Abusive Package
96+
## How To Report An Abusive Package
9797

9898
<Callout type="info">
9999
Do not use the **Report Abuse** form to submit reports of:
100-
100+
101101
* <Xref title="A package being outdated" value="package-triage-process" anchor="package-is-outdated" />.
102102
* <Xref title="A package being broken or not working" value="package-triage-process" anchor="package-is-broken" />.
103103
* Marketing or sales communications.
@@ -117,32 +117,6 @@ If a package is abusive, please report it by clicking on the **Report Abuse** li
117117

118118
![How to report abuse on the Chocolatey Community Repository](https://img.chocolatey.org/docs/automatic-packages/triage-reportabuse.jpg)
119119

120-
### Why do I get a 500 Internal Server Error when trying to push my package?
121-
122-
If you receive a `500 Internal Server Error` when pushing a package, you may have a malformed package that the server was unable to process.
123-
One such case is documented in a [GitHub issue](https://github.com/chocolatey/home/issues/303).
124-
125-
Make sure that none of the `<file ...>` entries in the `nuspec` file of your package have name collisions with other files or folders being packed.
126-
This is usually rare but can be encountered more commonly if you are trying to pack files which don't have a file extension.
127-
For example, if you have `<file>` entries that may look like this, you will need to change the name of the file or folder in the package to avoid collision:
128-
129-
```xml
130-
<file src="bin\*" target="bin" />
131-
<file src="file-with-no-extension" target="bin" />
132-
```
133-
134-
There are two possible solutions for this particular case:
135-
136-
```xml
137-
<!-- option 1: rename the file to have a file extension -->
138-
<file src="bin\*" target="bin" />
139-
<file src="file-with.extension" target="bin" />
140-
141-
<!-- option 2: specify the full path to the file in the package as the target, instead of just the folder name -->
142-
<file src="bin\*" target="bin" />
143-
<file src="file-with-no-extension" target="bin\file-with-no-extension" />
144-
```
145-
146-
See an [issue we raised on the NuGet repository](https://github.com/NuGet/Home/issues/13273) for more information on the NuGet bug which can cause this kind of malformed package.
120+
## Why do I get a 500 Internal Server Error when trying to push my package?
147121

148-
If you receive a `500: Internal Server Error` that is not related to this specific case, please [file an issue on GitHub](https://github.com/chocolatey/home) so we can investigate the issue.
122+
<Xref title="See the Chocolatey Community Repository Common Errors page" value="ccr-common-errors" anchor="error-500-internal-server-error" />.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
order: 50
3+
xref: ccr-common-errors
4+
title: Common Errors and Resolutions
5+
description: Common Errors and Resolutions encountered with pushing packages to the Chocolatey Community Repository
6+
---
7+
import Callout from '@choco-astro/components/Callout.astro';
8+
import Iframe from '@choco-astro/components/Iframe.astro';
9+
import Xref from '@components/Xref.astro';
10+
11+
## Have you pushed a package and gotten an error?
12+
13+
Once you've pushed a package to the Chocolatey Community Repository, Chocolatey CLI will report if it was successful or not. If for any reason it's not successful, it will report the error code and any response that it received. Sometimes the error text is not fully received due to various network issues. Below is a list of HTTP responses and what it could mean.
14+
15+
## Error 400 Bad Request
16+
17+
Can occur if the API Key is not a correctly formatted GUID, or the package you've attempted to push contains a non-normalized version number.
18+
19+
## Error 403 Unauthorized
20+
21+
There are a number of causes for the 403 error. Some common cases:
22+
23+
- Invalid API Key.
24+
- Package is not owned by the user pushing the package.
25+
- Package has a version in moderation and no approved versions.
26+
- Package has too many existing versions in moderation.
27+
- Package name is forbidden.
28+
29+
## Error 409 Conflict
30+
31+
There are 3 instances where this error could occur:
32+
33+
- Package and package version already exists and cannot be pushed again.
34+
- Package failed some basic validations such as the title or description are too long.
35+
- Some other unidentified error has occurred.
36+
37+
## Error 413 Request too large
38+
39+
Package is too large.
40+
41+
## Error 500 Internal Server Error
42+
43+
If you receive a `500 Internal Server Error` when pushing a package, you may have a malformed package that the server was unable to process.
44+
One such case is documented in this [GitHub issue](https://github.com/chocolatey/home/issues/303).
45+
46+
Make sure that none of the `<file ...>` entries in the `nuspec` file of your package have name collisions with other files or folders being packed.
47+
This is usually rare but can be encountered more commonly if you are trying to pack files which don't have a file extension.
48+
For example, if you have `<file>` entries that may look like this, you will need to change the name of the file or folder in the package to avoid collision:
49+
50+
```xml
51+
<file src="bin\*" target="bin" />
52+
<file src="file-with-no-extension" target="bin" />
53+
```
54+
55+
There are two possible solutions for this particular case:
56+
57+
```xml
58+
<!-- option 1: rename the file to have a file extension -->
59+
<file src="bin\*" target="bin" />
60+
<file src="file-with.extension" target="bin" />
61+
62+
<!-- option 2: specify the full path to the file in the package as the target, instead of just the folder name -->
63+
<file src="bin\*" target="bin" />
64+
<file src="file-with-no-extension" target="bin\file-with-no-extension" />
65+
```
66+
67+
See an [issue we raised on the NuGet repository](https://github.com/NuGet/Home/issues/13273) for more information on the NuGet bug which can cause this kind of malformed package.
68+
69+
If you receive a `500: Internal Server Error` that is not related to this specific case, please [file an issue on GitHub](https://github.com/chocolatey/home) so we can investigate the issue.

0 commit comments

Comments
 (0)