Skip to content

Commit 430cb6b

Browse files
author
gabino
committed
Improve transfer validation error handling
1 parent a6a6cca commit 430cb6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cep/transferencia.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ def _validar(
149149
receptorParticipante=1 if pago_a_banco else 0,
150150
)
151151
resp = client.post('/valida.do', request_body)
152-
if NOT_FOUND_ERROR_MESSAGE in resp.decode('utf-8'):
152+
if (
153+
NOT_FOUND_ERROR_MESSAGE in resp.decode('utf-8')
154+
or b'no encontrada' in resp
155+
):
153156
raise NotFoundError
154157
return client
155158

0 commit comments

Comments
 (0)