snapcraft exit code 0 on unsuccesful uploads
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
Today snapcraft is having issues. I found that if I upload my package, it errors with a HTTP 500 but nevertheless the process exits with exit code `0`. This makes it difficult to use snapcraft in shell scripts for build pipelines and such.
```
$ snapcraft upload myproject_amd64.snap
Uploading... 17744080/17744080
Issue encountered while processing your request: [500] Internal Server Error.
Full execution log: '/home/michiel/.local/state/snapcraft/log/snapcraft-20260325-124413.959196.log'
$ echo $?
0
```
Expected behavior was to see a non-zero exit code
### Steps to reproduce
Upload a snap to the snap store while snapcraft is having an outage
### Environment
just uploading using snapcraft 8.14.4 installed as a snap
### snapcraft.yaml
```yaml
```
### Log output
```shell
2026-03-25 12:44:13.960 Starting snapcraft, version 8.14.4
...
2026-03-25 12:44:14.060 HTTP 'POST' for 'https://dashboard.snapcraft.io/dev/api/snap-push/' with params None and headers {'Accept': 'application/json', 'Authorization': '<macaroon>', 'User-Agent': 'snapcraft/8.14.4 ubuntu/25.10 (x86_64)'}
2026-03-25 12:44:14.188 Beginning to upload a file 'myproject.snap' with size of 17743872 bytes
2026-03-25 12:44:14.188 Uploading... (--->)
2026-03-25 12:44:14.189 Uploading... (<---)
2026-03-25 12:44:14.189 HTTP 'POST' for 'https://storage.snapcraftcontent.com/unscanned-upload/' with params None and headers {'Content-Type': 'multipart/form-data; boundary=1d9371e3d1244d58b4da1b1cea107374', 'Accept': 'application/json', 'User-Agent': 'snapcraft/8.14.4 ubuntu/25.10 (x86_64)'}
2026-03-25 12:45:20.033 Issue encountered while processing your request: [500] Internal Server Error.
2026-03-25 12:45:20.035 Traceback (most recent call last):
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/snapcraft/application.py", line 183, in _run_inner
2026-03-25 12:45:20.035 return_code = super()._run_inner()
2026-03-25 12:45:20.035 ^^^^^^^^^^^^^^^^^^^^
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/craft_application/application.py", line 653, in _run_inner
2026-03-25 12:45:20.035 return_code = dispatcher.run() or os.EX_OK
2026-03-25 12:45:20.035 ^^^^^^^^^^^^^^^^
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
2026-03-25 12:45:20.035 return self._loaded_command.run(self._parsed_command_args)
2026-03-25 12:45:20.035 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/snapcraft/commands/upload.py", line 131, in run
2026-03-25 12:45:20.035 snap_upload_id = client.store_client.upload_file(
2026-03-25 12:45:20.035 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/craft_store/base_client.py", line 261, in upload_file
2026-03-25 12:45:20.035 response = self.http_client.request(
2026-03-25 12:45:20.035 ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-25 12:45:20.035 File "/snap/snapcraft/17288/lib/python3.12/site-packages/craft_store/http_client.py", line 165, in request
2026-03-25 12:45:20.035 raise errors.StoreServerError(response)
2026-03-25 12:45:20.035 craft_store.errors.StoreServerError: Issue encountered while processing your request: [500] Internal Server Error.
```
Evaluation history
No evaluation history available.