-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: POC RNF #751
base: main
Are you sure you want to change the base?
feat: POC RNF #751
Conversation
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.
Nice!
constructor(public message: string) { | ||
super(); | ||
} |
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.
I think you can omit the constructor...
exception instanceof NotASiretError | ||
) { | ||
return redirectPageNotFound(message, scope); | ||
} else if (exception instanceof IsLikelyAnIdRnfException) { | ||
return redirectIfIdRnf(message); | ||
} else if (exception instanceof NotAnIdRnfError) { | ||
return redirectIdRnfInvalid(message); | ||
} else if (exception instanceof RnfNotFoundError) { | ||
return redirectIdRnfIntrouvable(message); | ||
} else if (exception instanceof HttpNotFound) { | ||
return redirectPageNotFound(message, scope); | ||
} else if (exception instanceof SearchEngineError) { |
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.
It's a bit weird for me to use exception in that case. I'm not sure it should be handled as such, but instead, a well crafted type return type and a switch case in the top of the route. But this is outside of the scope of this PR
Co-authored-by: Johan Girod <[email protected]>
Context
The MI is currently working on a new DB called RNF (Répertoire National des Fondations).
They needs a platform to :
Current scope
First implementation of RNF :
/fondation/<ID_RNF>
075-FDD-00003-01
Next steps :
Invalid
/Not found
workflowscloses #731