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

Fix error handling when error is not an array #131

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nargonath
Copy link
Contributor

@Nargonath Nargonath commented Sep 25, 2020

This is linked to #124. It fixes the second error which was basically noise. FWIU Twitter returns errors as an array however when you throw an error because the TWITTER_ACCOUNT_ID is not set, errors[0] returns undefined. Then at this line you go through the array of errors and try to access error.message but since error is undefined you get the second error message I posted in the issue.

@Nargonath
Copy link
Contributor Author

Also now the CI/CD properly fails when throw the error for the missing account_id which was not the case before.

@Nargonath Nargonath force-pushed the fix-handle-error-when-not-array branch from fe4de17 to 4372851 Compare September 25, 2020 09:25
@Nargonath
Copy link
Contributor Author

I added the missing test to bring coverage to 100%. There is an error still but I don't understand it. I don't know how to fix it.

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

Successfully merging this pull request may close these issues.

1 participant