Improve the error throws when a template to owned by a non root-admin is registered for all zones. (#11170)

This commit is contained in:
Abhisar Sinha 2025-07-10 13:09:13 +05:30 committed by GitHub
parent 67a1ea35f4
commit 7715b3dc29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,7 +192,8 @@ public abstract class TemplateAdapterBase extends AdapterBase implements Templat
if (!isAdmin && zoneIdList == null && !isRegionStore ) {
// domain admin and user should also be able to register template on a region store
throw new InvalidParameterValueException("Please specify a valid zone Id. Only admins can create templates in all zones.");
throw new InvalidParameterValueException("Template registered for 'All zones' can only be owned a Root Admin account. " +
"Please select specific zone(s).");
}
// check for the url format only when url is not null. url can be null incase of form based upload