N4S4 / synology-api

A Python wrapper around Synology API
MIT License
368 stars 138 forks source link

Error codes #108

Closed eddybl closed 1 year ago

eddybl commented 1 year ago

I reworked the authentication structure, stream lined some duplicate code and added also a error code check for request_data()

In general I don't think login() has to return something which is then checked for debug in every station API just to print that, but in that case login() can just directly print if debug is active

eddybl commented 1 year ago

No idea why there is a file conflict?

Also one could consider raising an exception if the login fails (without debug: just exception, with debug: exception with error message, for example)

N4S4 commented 1 year ago

I am sure the conflict is because I commit the logout integration before your PR, I will have a look today

N4S4 commented 1 year ago

Looks great,

merging to the branch