mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 14:49:32 +01:00
9 lines
340 B
JavaScript
9 lines
340 B
JavaScript
|
export function displayError(el, err) {
|
||
|
el.classList.remove('is-loading');
|
||
|
const errorNode = document.createElement('pre');
|
||
|
errorNode.setAttribute('class', 'ui message error markup-block-error');
|
||
|
errorNode.textContent = err.str || err.message || String(err);
|
||
|
el.before(errorNode);
|
||
|
el.setAttribute('data-render-done', 'true');
|
||
|
}
|