Skip to content

Commit 00e18d0

Browse files
committed
(#426) Add Common Errors page
1 parent d6e83f0 commit 00e18d0

File tree

2 files changed

+70
-27
lines changed

2 files changed

+70
-27
lines changed

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

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -119,30 +119,4 @@ If a package is abusive, please report it by clicking on the **Report Abuse** li
119119

120120
## Why do I get a 500 Internal Server Error when trying to push my package?
121121

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.
147-
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 Encountered
5+
description: descriptiono
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+
## You've pushed a package, but got 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 validly 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 a [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)