Loyal-Young opened a new issue, #6049:
URL: https://github.com/apache/rocketmq-dashboard/issues/6049

   ### Before Creating the Bug Report
   
   - [x] Searched prompt-template storage reports. #4575 fixes corrupt JSON, 
#5333 scopes ownership, and #5728 concerns MetricsExplorer; this is the storage 
getter throwing before the current try/catch.
   
   ### Studio Version
   
   rocketmq-studio at 29fe48abc98583cfc77f97188f187cca3ad85dae.
   
   ### Runtime Environment
   
   Windows / Node 24.18.0; browser storage denied through a throwing 
localStorage property getter (SecurityError).
   
   ### Connected RocketMQ Cluster
   
   Not needed for browser-local prompt templates.
   
   ### Describe the Bug
   
   promptTemplates.getStorage evaluates typeof localStorage and then returns 
localStorage outside a try/catch. A browser can throw on access to the Storage 
property itself. Because the public catalog/save/delete functions evaluate 
getStorage in their default arguments, none of their method-level error 
handling runs. Opening the templates modal therefore throws instead of 
displaying built-in templates and the existing storage-unavailable warning.
   
   ### Steps to Reproduce
   
   Make the localStorage getter throw a SecurityError, then call 
loadPromptTemplateCatalog() or open PromptTemplateModal. Also attempt 
saveCustomPromptTemplate and deleteCustomPromptTemplate without an injected 
Storage.
   
   ### What Did You Expect to See?
   
   The existing unavailable-storage result should be returned; built-in 
templates should remain usable. Ordinary storage and explicitly injected 
storage should retain their behavior.
   
   ### Are You Willing to Submit a Pull Request?
   
   Yes, with public API and modal regression coverage.
   
   ### AI assistance
   
   AI assistance was used to inspect and draft the report; regression 
verification will be reported on the PR.


-- 
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]

Reply via email to