Skip to content
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

detailedReport method - detailed report with user id (user_ids) - return Error 500 #13

Open
gabrielstuff opened this issue Dec 19, 2017 · 0 comments

Comments

@gabrielstuff
Copy link

Hello and thanks for this sweet wrapper.

While, i'm trying to use the detailedReport method, I met an issue while trying to use the user_ids param. It is written that it could take an array of ids. I've tried with the following value:

let userList = ['1757147', '1757126']

and toggl response was:

{ Error: ArgumentError - Sorry, something has gone wrong. Please contact support@toggl.com
at Request.onresponse [as _callback] (/toggl-day/node_modules/toggl-api/lib/client.js:283:16)
at Request.self.callback (/toggl-day/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/toggl-day/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/toggl-day/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
code: 500,
tip: 'Please contact support@toggl.com with information on your request' }

But if I remove this user_ids param, no more issues.

toggl.detailedReport({workspace_id: wid, billable:'both', display_hours:'minutes', since: sinceDate, until: sinceDate, user_ids: userList, page: 1, user_agent: 'toggl-day'}, (err, data) => {
  if (err) {
    console.error(err)
  } else {
    console.log(data)
  }
})

Thanks for any help you could provide.

@gabrielstuff gabrielstuff changed the title detailled report - Error 500 detailedReport method - detailed report with user id (user_ids) - return Error 500 Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant