You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
making this change will show the full error details, so the users knows all the reasons behind the error, just like Slack's API "Tester" shows the detailed results for errors:
e.g. slacker.Error: '{"ok": false,"error": "missing_scope","needed": "users:read","provided": "admin,identify"}
pgm flow happens (and still will happen) like so:
Traceback (most recent call last):
* * *
File "c:\program files (x86)\python37\lib\site-packages\slacker\__init__.py", line 332, in list
return self.get('users.list', params={'presence': int(presence)})
File "c:\program files (x86)\python37\lib\site-packages\slacker\__init__.py", line 121, in get
api, **kwargs
File "c:\program files (x86)\python37\lib\site-packages\slacker\__init__.py", line 103, in _request
raise Error(response.raw)
slacker.Error: {"ok":false,"error":"missing_scope","needed":"users:read","provided":"admin,identify"}
would like to see this change (or better) implemented in this original repo, for benefit of users of this repo and it's forks
The text was updated successfully, but these errors were encountered:
agree, thanks. I guess a couple of ways to get around the guessing game are either:
to pre-determine all the access caveats (manually or automated) for each Slack object type and store 'em in a JSON/db/file and use it to know which accesses should be used for what object type, perform all these grants (manully or automated) and then we won't have any errors for processing actions like backups, etc.
or,
(if we don't like the above option) to automate the adds/updates of the permissions in a loop - from the error msg, whose structure is pretty standard (no AI that is, LOL), e.g.:
clearly says what the error is, what's lacking and what's needed. So in the loop we find out the permissions that are lacking and make Slack API calls to add/update them, until there are no errors.
Hope this answers your qn. Will post other options, as and when I can come up with 'em.
Thanks again!!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
currently, in "__ init __.BaseAPI()" , on an error, only the error text is shown:
e.g. "slacker.Error: missing_scope"
which hides the detailed reasons for the error, 'coz of usage of just "error.text", instead of using "error.raw", in line # 112
this change has been implemented in these lines in the below forked repo:
https://github.com/fixbugsnow/slacker/blob/master/slacker/__init__.py#L102-L112
making this change will show the full error details, so the users knows all the reasons behind the error, just like Slack's API "Tester" shows the detailed results for errors:
e.g. slacker.Error: '{"ok": false,"error": "missing_scope","needed": "users:read","provided": "admin,identify"}
pgm flow happens (and still will happen) like so:
would like to see this change (or better) implemented in this original repo, for benefit of users of this repo and it's forks
The text was updated successfully, but these errors were encountered: