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

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

Open
dlsyliu opened this issue Jun 21, 2023 · 1 comment
Open

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

dlsyliu opened this issue Jun 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dlsyliu
Copy link

dlsyliu commented Jun 21, 2023

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

@dlsyliu dlsyliu added the bug Something isn't working label Jun 21, 2023
@tlawrie
Copy link
Member

tlawrie commented Jun 23, 2023

FYI @gchickma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants