{#if err !== undefined}
{err}
{:else}
{#if $messages.length > 0} {#each $messages as msg}
{msg.message}
{/each} {/if}
{/if}