MCPcopy Index your code
hub / github.com/TanStack/ai / showError

Function showError

examples/vanilla-chat/src/main.js:147–156  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

145
146// Show error
147function showError(error) {
148 if (!errorDiv) return
149
150 if (error) {
151 errorDiv.textContent = error.message || 'An error occurred'
152 errorDiv.style.display = 'block'
153 } else {
154 errorDiv.style.display = 'none'
155 }
156}
157
158// Escape HTML to prevent XSS
159function escapeHtml(text) {

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected