-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: remplace cv url by cv binary #220
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.
Le pattern except Exception
est à enlever partout. Est ce que je t'ai pas déjà expliquer que c'est une pratique dangereuse ?
|
||
try: | ||
binary_data = base64.b64decode(cv_base64) | ||
except Exception as e: |
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.
Non ca c'est trop excep Exception
ca va tout catcher. Ca veut dire si par exemple dans ton code a un moment tu fais une erreur du genre
try:
binary_data = base64.b64decodeX(cv_base64) <==== le X à la fin de ba64decode
Tu vas rien voir. Soubhana Lah. Tu trouves ca normal ?
Tu vas raiser en dessous Base64DecodeError comme si c'est un problème dans la data alors que en fait c'est une erreur. La méthode b64decodeX
n'existe pas il faut enlever le X
Le message c'est que faut quasiment jamais faire except Exception
c'est trop dangereux. Donc la soit tu vas chercher les erreur suceptible d'être raisé du genre si tu fais json.loads(SOME_USER_DATA_THAT_MIGHT_BE_MALFORMATED)
tu peux faire except JSONDecodeError ici c'est justifié.
Mais except Exception
non c'est trop
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.
ok j'ai enlevé le catch des erreurs. en cherchant j'ai trouvé qu'il y a une erreur possible que le len soit pas divisible par 4 donc à ajouter des 4. c'est seulement l'erreur que j'ai catché
mime = magic.Magic(mime=True) | ||
content_type = mime.from_buffer(binary_data) | ||
return content_type | ||
except Exception as e: |
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.
Même commentaire par rapport à except Exception
Tu remplaces ca par l'erreur qui peut être raisé en circonstance normale
* fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
* feat: consider info if exists rather than the parsed info * fix: add case urls in info of profile json * fix: after jamal review * fix: remplace cv url by cv binary (#220) * fix:add some error handling for jobology connector * fix:jobology flake8 connector * fix:some type * fix:regarding jamal review * fix: remplace cv url by cv binary * docs: update docs * fix: flake8 outputs * fix: jobology catch profile * docs: update docs * fix: regarding jamal review * fix: handle possible error binasciii * fix: flake8 and docs * fix: some flake8 output * fix: correct update date for Jobology connector (#222) Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> * 4.6.1 Automatically generated by python-semantic-release * fix: regarding jamal review location=value --------- Co-authored-by: the-forest-tree <65894619+the-forest-tree@users.noreply.github.com> Co-authored-by: the-forest-tree <the-forest-tree@hrflow.ai> Co-authored-by: hrflow-semantic-release <hrflow-semantic-release>
No description provided.