mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-12 12:25:53 +00:00
Better frontend error messages
This commit is contained in:
parent
f9e35e6eaf
commit
6eeabf657e
1 changed files with 3 additions and 1 deletions
|
|
@ -180,9 +180,11 @@ export class SessionCreateForm extends LitElement {
|
|||
);
|
||||
} else {
|
||||
const error = await response.json();
|
||||
// Use the detailed error message if available, otherwise fall back to the error field
|
||||
const errorMessage = error.details || error.error || 'Unknown error';
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('error', {
|
||||
detail: `Failed to create session: ${error.error}`,
|
||||
detail: errorMessage,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue