-
Notifications
You must be signed in to change notification settings - Fork 0
fix(demarches-simplifies): check if url exists via HEAD request #252
Conversation
@@ -159,37 +158,4 @@ describe("validatePsychologist", () => { | |||
candidateIsNotAPsychologistMessage("73") | |||
); | |||
}); | |||
|
|||
it("should fail when website is wrong", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai enlevé le test car la validation ne se trouve plus au même endroit et n'est donc plus gérée par zod via validatePsychologist
src/utils/url-exists.ts
Outdated
}; | ||
|
||
const req = http.request(options, (res) => { | ||
resolve(res.statusCode < 400 || res.statusCode >= 500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si c'est >= 500 c'est valide ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Euh oui, j'avais copié/collé mais ça me parait bizarre. J'imagine que c'était pour dire "si le site fait une erreur 500, il existe et il répond, il est juste planté", mais dans notre cas ça n'a pas d'intérêt. J'ai changé pour accepter seulement en dessous de 400.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
🎉 Deployment for commit 5ca5d75 : IngressesDocker images
|
## [1.56.1](v1.56.0...v1.56.1) (2022-09-27) ### Bug Fixes * **demarches-simplifies:** check if url exists via HEAD request ([#252](#252)) ([14fbc8f](14fbc8f))
🎉 This PR is included in version 1.56.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Ça a l'air de marcher :)