rybakovanton-metta opened a new issue, #11513:
URL: https://github.com/apache/cloudstack/issues/11513
### problem
##### ISSUE TYPE
* Bug Report
##### COMPONENT NAME
~~~
UI, Template Upload, Error Handling
~~~
##### SUMMARY
<!-- Explain the problem/feature briefly -->
Template upload shows generic "Request failed with status code 500" error
in UI instead of displaying the actual server error message, making debugging
impossible for users.
### versions
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.20.1.0
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
Advanced networking, KVM hypervisor
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Ubuntu 22.04, KVM hosts
### The steps to reproduce the bug
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal
test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
<!-- Paste example playbooks or commands between quotes below -->
~~~
1. Go to Templates → Register Template
2. Upload a QCOW2 file that has format detection issues (e.g., with
DOS/MBR boot sector)
3. Select "QCOW2" as format
4. Click Register Template
5. Observe error message in UI
~~~
### What to do about it?
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
UI should display the actual error message from server, such as:
"File type mismatch between uploaded file and selected format. Selected
file format: QCOW2. Received: DOS/MBR boot sector, extended partition table
(last)"
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
UI shows useless generic error:
"Upload Failed - Failed to upload Template - Error: Request failed with
status code 500"
Meanwhile server logs show the actual useful error:
2025-08-25 20:53:50,648 WARN [c.c.a.AlertManagerImpl] Template Template
{"format":"QCOW2","id":224,"name":"Ubuntu Server 24.04 Custom"} failed to
upload.
Error details: File type mismatch between uploaded file and selected
format. Selected file format: QCOW2. Received: DOS/MBR boot sector, extended
partition
table (last)
Users are forced to check server logs to understand why uploads fail.
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]