glittershark / org-clubhouse

Simple, unopinionated integration between Emacs's org-mode and the Clubhouse issue tracker
MIT License
28 stars 13 forks source link

Wrong type argument: sequencep, org-shortcut-auth-token #40

Open tillydray opened 1 year ago

tillydray commented 1 year ago

First, thank you for creating this! I just started a new job that uses Shortcut and I'm hopeful that I can use Emacs like a sane person šŸ˜†

When running org-shortcut-headlines-from-query I get the following error

GET search/stories nil
Contacting host: api.app.shortcut.com:443
url-http-create-request: Wrong type argument: sequencep, org-shortcut-auth-token

I am able to hit the shortcut api directly with this curl so I know my token and setup are working.

#+begin_src bash
curl -X GET \
  -H "Content-Type: application/json" \
  -H "Shortcut-Token: REDACTED" \
  -d '{ "detail": "full", "page_size": 1, "query": "team:service-efficiency" }' \
  -L "https://api.app.shortcut.com/api/v3/search"
#+end_src

I do not have the time right now to dig into this but I will try to troubleshoot properly, hopefully within the next 8 days or so.

Here is my config

#+begin_src emacs-lisp :tangle ~/.doom.d/config.el
(use-package! org-shortcut)

(setq org-shortcut-auth-token "REDACTED"
      org-shortcut-team-name "COMPANY_NAME"
      org-shortcut-username "REDACTED")
#+end_src
tillydray commented 1 year ago

In case it helps, here's the debug on error

Debugger entered--Lisp error: (wrong-type-argument sequencep org-shortcut-auth-token)
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_10>(("Shortcut-Token" . org-shortcut-auth-token))
  url-http-create-request()
  url-http(#s(url :type "https" :user nil :password nil :host "api.app.shortcut.com" :portspec nil :filename "/api/v3/search/stories" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) #f(compiled-function (&rest args) #<bytecode 0xcd60f46326e9eef>) (nil) nil tls)
  url-https(#s(url :type "https" :user nil :password nil :host "api.app.shortcut.com" :portspec nil :filename "/api/v3/search/stories" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) #f(compiled-function (&rest args) #<bytecode 0xcd60f46326e9eef>) (nil))
  url-retrieve-internal("https://api.app.shortcut.com/api/v3/search/stories" #f(compiled-function (&rest args) #<bytecode 0xcd60f46326e9eef>) (nil) nil nil)
  url-retrieve("https://api.app.shortcut.com/api/v3/search/stories" #f(compiled-function (&rest args) #<bytecode 0xcd60f46326e9eef>) nil nil nil)
  url-retrieve-synchronously("https://api.app.shortcut.com/api/v3/search/stories")
  org-shortcut-request("GET" "search/stories" :params ((query "team:service-efficiency")))
  org-shortcut--search-stories("team:service-efficiency")
  org-shortcut-headlines-from-query(1 "team:service-efficiency")
  funcall-interactively(org-shortcut-headlines-from-query 1 "team:service-efficiency")
  command-execute(org-shortcut-headlines-from-query record)
  counsel-M-x-action("org-shortcut-headlines-from-query")
  ivy-call()
tillydray commented 1 year ago

After applying the PR here https://github.com/glittershark/org-clubhouse/pull/39 I get this new error

GET search/stories nil
Contacting host: api.app.shortcut.com:443
equal: Wrong type argument: listp, (query . "missing-required-key")