Skip to content

Commit

Permalink
Invalid language should be a 404 error yielding a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchereau committed Apr 17, 2018
1 parent 23c64c5 commit 303d681
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 30 deletions.
35 changes: 20 additions & 15 deletions webapp/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,29 +251,34 @@
}
},
"params": {
"invalidObjectId": {
"status": 400,
"title": "400 - Bad Request",
"message": "Invalid object identifier: an identifier is an hexadecimal string of 24 characters."
"invalidFileId": {
"status": 404,
"title": "404 - Not Found",
"message": "Invalid file id: use a name of 3 to 50 and an extension of 2 to 7 alphanumeric characters"
},
"invalidLanguage": {
"status": 400,
"title": "400 - Bad Request",
"status": 404,
"title": "404 - Not Found",
"message": "Invalid language: this language is not implemented."
},
"invalidProvider": {
"status": 400,
"title": "400 - Bad Request",
"message": "Invalid provider: use `facebook`, `google`, `live` or `twitter`"
},
"invalidMonth": {
"status": 400,
"title": "400 - Bad Request",
"status": 404,
"title": "404 - Not Found",
"message": "Invalid month: use a two-digit number between 01 and 12"
},
"invalidObjectId": {
"status": 404,
"title": "404 - Not Found",
"message": "Invalid object identifier: an identifier is an hexadecimal string of 24 characters."
},
"invalidProvider": {
"status": 404,
"title": "404 - Not Found",
"message": "Invalid provider: use `facebook`, `google`, `live` or `twitter`"
},
"invalidYear": {
"status": 400,
"title": "400 - Bad Request",
"status": 404,
"title": "404 - Not Found",
"message": "Invalid year: use a four-digit number between 2014 and the current year"
}
},
Expand Down
35 changes: 20 additions & 15 deletions webapp/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,29 +251,34 @@
}
},
"params": {
"invalidObjectId": {
"status": 400,
"title": "400 - Mauvaise Requête",
"message": "Identifiant d'objet erroné: un identifiant est une chaîne de 24 caractères hexadécimaux."
"invalidFileId": {
"status": 404,
"title": "404 - Introuvable",
"message": "Identifiant de fichier erroné: veuillez utiliser un nom de 3 à 50 et une extension de 2 à 7 caractères alphanumeriques"
},
"invalidLanguage": {
"status": 400,
"title": "400 - Mauvaise Requête",
"status": 404,
"title": "404 - Introuvable",
"message": "Langue erronée: cette langue n'est pas définie."
},
"invalidProvider": {
"status": 400,
"title": "400 - Mauvaise Requête",
"message": "Service erroné: utlisez `facebook`, `google`, `live` ou `twitter`"
},
"invalidMonth": {
"status": 400,
"title": "400 - Mauvaise Requête",
"status": 404,
"title": "404 - Introuvable",
"message": "Mois erroné: veuillez utiliser un nombre à quatre chiffres compris entre 01 et 12."
},
"invalidObjectId": {
"status": 404,
"title": "404 - Introuvable",
"message": "Identifiant d'objet erroné: un identifiant est une chaîne de 24 caractères hexadécimaux."
},
"invalidProvider": {
"status": 404,
"title": "404 - Introuvable",
"message": "Service erroné: utlisez `facebook`, `google`, `live` ou `twitter`"
},
"invalidYear": {
"status": 400,
"title": "400 - Mauvaise Requête",
"status": 404,
"title": "404 - Introuvable",
"message": "Année erronée: veuillez utiliser un nombre à quatre chiffres compris entre 2014 et l'année en cours."
}
},
Expand Down

0 comments on commit 303d681

Please sign in to comment.