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

TypeError when iterating through headshots output on train-webhook #97

Closed
GGalupo opened this issue Jan 18, 2024 · 1 comment · May be fixed by #98
Closed

TypeError when iterating through headshots output on train-webhook #97

GGalupo opened this issue Jan 18, 2024 · 1 comment · May be fixed by #98

Comments

@GGalupo
Copy link

GGalupo commented Jan 18, 2024

If the output from train-webhook endpoint doesn't have enough items to fill headshots_part_2, headshots_part_3 or headshots_part_4, a TypeError will be thrown, because it's trying to iterate on undefined to create allHeadshots const.

This behavior makes the function execution to stop, and images are not saved on the database.

Output

Screenshot_3

Error message on Vercel console

Screenshot_2

I'll make a PR to fix this issue.

@Marfuen
Copy link
Contributor

Marfuen commented Jan 18, 2024

@GGalupo Hey, so I don't think this is an issue since if you use the headshots template 1:1 and the template workflow this will work.

If someone edits their workflow to not have those outputs then it would be up to them to update their code to show that too

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 a pull request may close this issue.

3 participants