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

Cannot query a subaccount with API #631

Open
sbsroc opened this issue Aug 25, 2024 · 1 comment
Open

Cannot query a subaccount with API #631

sbsroc opened this issue Aug 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Urgent Created by Linear-GitHub Sync

Comments

@sbsroc
Copy link

sbsroc commented Aug 25, 2024

When I query the API at /api/accounts?page_size=500&page=1&search_keyword=MyAccount it will return data IF the account is NOT a subaccount. I have not found a way to query subaccounts with the API. I get the following error.

Array
(
    [error] => HTTP status code 500 was received
    [rawResponse] => {"status_code":500,"error":"Internal Server Error","message":"An internal server error occurred","stack":"TypeError: Cannot read properties of undefined (reading 'children')\n    at /app/packages/server/build/index.js:138464:31\n    at Array.forEach (<anonymous>)\n    at Object.flatToNestedArray (/app/packages/server/build/index.js:138458:10)\n    at AccountTransformer.postCollectionTransform (/app/packages/server/build/index.js:43265:41)\n    at Transformer.work (/app/packages/server/build/index.js:26058:29)\n    at TransformerInjectable.transform (/app/packages/server/build/index.js:26249:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async GetAccounts.getAccountsList (/app/packages/server/build/index.js:44471:41)\n    at async AccountsController.getAccountsList (/app/packages/server/build/index.js:399:46)"}
)

I was able to confirm by unchecking "Subaccount" on the account and saving. The API call was then successful.

Copy link

linear bot commented Aug 25, 2024

@abouolia abouolia self-assigned this Aug 25, 2024
@abouolia abouolia added bug Something isn't working Urgent Created by Linear-GitHub Sync labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Urgent Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants