Skip to content

Commit

Permalink
feat(frontend): better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Data5tream committed Apr 18, 2023
1 parent b05ffcf commit 67b3021
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/src/lib/components/StatusEntry.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@
import StatusIcon from './StatusIcon.svelte';
export let data: Watchpoint;
let statusMsg = '';
$: if (data) {
if (data.status < 600) {
statusMsg = `${data.status}`;
} else if (data.status === 600) {
statusMsg = 'Invalid DNS';
} else if (data.status === 601) {
statusMsg = 'TLS validation error';
}
}
</script>

<div class="watchpoint">
<h4>{data.watchpoint.name}</h4>
<div class="content">
Status: <StatusIcon status={data.status} />
{data.status}<br />
Status: <StatusIcon status={data.status} />&nbsp;{statusMsg}<br />
URL: <a href={data.watchpoint.url} class="url">{data.watchpoint.url}</a>
</div>
</div>
Expand Down

0 comments on commit 67b3021

Please sign in to comment.