Skip to content

Commit

Permalink
Show informative error message for failed foreigners' requests (see #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasmalacofilho committed Jan 12, 2018
1 parent 0b94337 commit f6c3611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ January 12th, 2018.
- Log belNumber when aborting due to invalid captcha
- Disable requests by foreigners, AcessoCard can't handle them (see #16)
- Simplify /novo/confirma display of documents' fields
- Show informative error message for failed foreigners' requests (see #16)


## Patch release: v1.1.3
Expand Down
9 changes: 6 additions & 3 deletions src/views/Status.tt
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@
</div>
</div>

(: if err != null && (err.match(AcessoUserOrDataError(_) | AcessoPermanentError(_))) :)
(: if err != null && (err.match(AcessoUserOrDataError(_) | AcessoPermanentError(_) | SendGridError(_))) :)

<div class="ui vertical segment">
<div class="ui text container">
<div class="ui red message">
<div class="header">Não foi possível solicitar seu cartão</div>
(: switch err :)
(: case AcessoUserOrDataError(res) :)
(: switch card :)
(: case Failed(AcessoUserOrDataError(res), _) :)
<p>Erro validando seus dados:</p>
(: if res.FieldErrors != null && res.FieldErrors.length > 0 :)
<ul>
Expand All @@ -80,6 +80,9 @@
<p>(:translate(res.Message):)</p>
(:end:)
<p>Você pode tentar novamente.</p>
(: case Failed(AcessoPermanentError({ ResultCode:82, Message:"Erro_tipo_cliente_nao_permitido" }), AcessoCard(SolicitarAdesaoCliente)) :)
<p>Infelizmente ainda não conseguimos emitir cartões para estrangeiros.</p>
<p>Se você também possui nacionalidade brasileira, você pode tentar novamente com ela.</p>
(: case other :)
<p>Você pode tentar novamente or voltar a esta página mais tarde.</p>
(: end :)
Expand Down

0 comments on commit f6c3611

Please sign in to comment.