mirror of
https://github.com/rikkaneko/paste.git
synced 2025-06-06 16:45:41 +00:00
Add error message text response (frontend)
Use Referer header over Origin header Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
parent
a88c7321cf
commit
8704a9161e
2 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ $(function () {
|
|||
show_pop_alert(`Paste #${paste_info.uuid} created!`, 'alert-success');
|
||||
pass_input.val('');
|
||||
} else {
|
||||
throw new Error('Unable to upload paste');
|
||||
throw new Error(`Unable to upload paste: ${(await res.text()) || `${res.status} ${res.statusText}`}`);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('error', err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue