Compare commits
20 Commits
ecc80ea82c
...
37fcc2d65a
Author | SHA1 | Date |
---|---|---|
Nicolas Roche | 37fcc2d65a | |
Nicolas Roche | 1257eea8d2 | |
Nicolas Roche | f5dc0f4fb2 | |
Nicolas Roche | 3946028e53 | |
Nicolas Roche | 998e1c1208 | |
Nicolas Roche | aa99a0d826 | |
Nicolas Roche | e2047aa318 | |
Nicolas Roche | 6546c7ac63 | |
Nicolas Roche | 2083b70610 | |
Nicolas Roche | a15c80765b | |
Nicolas Roche | bcbe12679e | |
Nicolas Roche | ae5681b0e7 | |
Nicolas Roche | 03cbdf578f | |
Nicolas Roche | e873bfaaa8 | |
Nicolas Roche | 59989d562b | |
Nicolas Roche | aa250342da | |
Nicolas Roche | 59955c60db | |
Nicolas Roche | 72b3cc8a87 | |
Nicolas Roche | ea1c2b34bb | |
Lauréline Guérin | 95ba4d5f0e |
|
@ -17,8 +17,9 @@ KNOWN_ERRORS = {
|
|||
'Pas de droit sur la période demandée pour la prestation sélectionnée et le bénéficiaire choisi',
|
||||
'Pas de droit sur la période demandée pour la prestation sélectionnée.',
|
||||
"Votre quotient familial (Qf) sur cette période est non disponible. Pour plus d'information, contactez-nous.",
|
||||
# API particulier error message not from the source above
|
||||
# API particulier error messages not from the source above
|
||||
'Les paramètres fournis sont incorrects ou ne correspondent pas à un avis',
|
||||
"L'identifiant indiqué n'existe pas, n'est pas connu ou ne comporte aucune information pour cet appel.",
|
||||
},
|
||||
400: {
|
||||
'Absence de code confidentiel. Le document ne peut être édité.',
|
||||
|
|
|
@ -147,6 +147,18 @@ def api_particulier_error_not_found_deregistrated(url, request):
|
|||
)
|
||||
|
||||
|
||||
@urlmatch(netloc=r'^particulier.*\.api\.gouv\.fr$')
|
||||
def api_particulier_error_not_found_identifier(url, request):
|
||||
return response(
|
||||
404,
|
||||
{
|
||||
'error': 'not_found',
|
||||
'message': "L'identifiant indiqué n'existe pas, n'est pas connu ou ne comporte aucune information pour cet appel.",
|
||||
},
|
||||
request=request,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_api_particulier():
|
||||
with HTTMock(
|
||||
|
@ -383,6 +395,7 @@ def test_detail_page(app, resource, admin_user):
|
|||
(api_particulier_error_not_json, True),
|
||||
(api_particulier_error_not_found_caf, False),
|
||||
(api_particulier_error_not_found_deregistrated, False),
|
||||
(api_particulier_error_not_found_identifier, False),
|
||||
],
|
||||
)
|
||||
def test_api_particulier_dont_log_not_found(app, resource, mock, should_log):
|
||||
|
|
Loading…
Reference in New Issue