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

[enh] Simplify moulinette errors #180

Merged
merged 8 commits into from Dec 15, 2018

Conversation

Projects
None yet
3 participants
@irina11y
Copy link
Contributor

irina11y commented Nov 25, 2018

The problem

Utilisation trop complexe. Fait perdre du temps de dev.
Solution

Supression des code d'erreur "errno et de l'internationalisation "m18n.n"

this PR depends of YunoHost/yunohost#574

@alexAubin alexAubin added this to the 3.4.x milestone Nov 27, 2018

@alexAubin alexAubin changed the title Enh Simplify moulinette error [enh] Simplify moulinette error s Dec 12, 2018

@alexAubin alexAubin changed the title [enh] Simplify moulinette error s [enh] Simplify moulinette errors Dec 12, 2018

@alexAubin alexAubin force-pushed the irina11y:enh-moulinette-error branch from 4826ac2 to a58d4db Dec 12, 2018

@alexAubin

This comment has been minimized.

Copy link
Member

alexAubin commented Dec 12, 2018

This should now be ready for final review (and careful final re-reading to spot any typo that would have been missed so far).

(The branch has been rebased to current stretch-unstable and misc fixes have been implemented, tested the whole thing with the unit/functional tests)

@alexAubin
Copy link
Member

alexAubin left a comment

Careful rereading, looks good to me.

@alexAubin

This comment has been minimized.

Copy link
Member

alexAubin commented Dec 13, 2018

Meh I'm discovering that in api.py there is a function error_to_reponse which converts the (old) errno to an HTTP error code : 40x or 500. We gotta see what to do about this but in the meantime, this PR probably breaks the webadmin.

@alexAubin alexAubin referenced this pull request Dec 13, 2018

Merged

Autopep8 #187

0 of 4 tasks complete
@Psycojoker
Copy link
Member

Psycojoker left a comment

We've been discussing about using StandardError vs Exception on the dev chan and since StandardError is converted by lib2to3 (to port code to python 3) to Exception and we want to move to python 3, we should only uses Exception.

Otherwise the PR looks good to me.

Thanks for it, it will make working on YunoHost easier :) 👍

@alexAubin

This comment has been minimized.

Copy link
Member

alexAubin commented Dec 14, 2018

  • replaced StandardError by Exception (though that was to be done in #187 anyway)

About error_to_response, to me it looks like we should just remove it and trigger Error 400 in ~all cases. The changes are implemented in 8e91c0d. Also see this issue/comment in yunohost admin which is related : YunoHost/yunohost-admin#220 .

@alexAubin alexAubin merged commit e6c41b1 into YunoHost:stretch-unstable Dec 15, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment