boomerang-io / community

The Boomerang community, roadmap, planning, and architecture repository. The central place for information on joining, contributing, and governance.
https://useboomerang.io
Apache License 2.0
11 stars 0 forks source link

The workflow activity logs exist the syntax/Type error #407

Open dlsyliu opened 1 year ago

dlsyliu commented 1 year ago

Describe the bug

I found two kinds of syntax/Type error in logs.

  1. SyntaxError: Unexpected token U in JSON at position 0(e.g: this request )
  2. TypeError: Cannot read property ‘slug’ of undefined(e.g:activity)

For the second Type error, as i checked the worker.flow source code, if it can’t get the team value, then it will occur to can’t read property ‘slug’ of undefined error, maybe that's due to team.slug is no value? const team = await RetrieveTeamByOrgName(url, token, organizationName, teamName); image (15) image (16)

img17

What project does this issue relate to?

Boomerang Flow

To Reproduce

This is the "Invite Member to Team via GitHub userName" Http request and response result from request

request { method: 'GET', baseUrl: 'https://github.ibm.com/api/v3', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'Boomerang Flow Joe Bot octokit-rest.js/17.11.2 octokit-core.js/2.5.4 Node.js/14.19.0 (Linux 4.18; x64)' }, mediaType: { format: '', previews: [] }, request: { agent: undefined, hook: [Function: bound bound register] }, url: '/orgs/{org}/teams', org: 'Boomerang-Delivery', per_page: '100', page: 1 }

GET /orgs/Boomerang-Delivery/teams?per_page=100&page=1 - 200 in 265ms 06/21/23 09:24:13 🔍 Successful response: [ { name: 'Abu Dhabi Health Authority - DOH', id: 22310, node_id: 'MDQ6VGVhbTIyMzEw', slug: 'abu-dhabi-health-authority-doh', description: '', privacy: 'secret', url: 'https://github.ibm.com/api/v3/organizations/132952/team/22310', html_url: 'https://github.ibm.com/orgs/Boomerang-Delivery/teams/abu-dhabi-health-authority-doh', members_url: 'https://github.ibm.com/api/v3/organizations/132952/team/22310/members{/member}', repositories_url: 'https://github.ibm.com/api/v3/organizations/132952/team/22310/repos', permission: 'pull', parent: null },

Environment

prod and stage env

Additional Contenxt

No response

tlawrie commented 1 year ago

FYI @gchickma