Skip to content

Commit

Permalink
Merge pull request #76 from Doarakko/topic/response-error
Browse files Browse the repository at this point in the history
add images handling
  • Loading branch information
Doarakko authored Aug 21, 2024
2 parents a8a2224 + 83f8ba8 commit 3d7421b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function run() {
})
.then((data) => {
const cardName = data.name;
if (!(('card_images' in data) && Array.isArray(data.card_images) && data.card_images.length > 0)) {
throw new Error("Failed to get card images");
}
const imageUrl = data.card_images[0].image_url;

octokit.request(
Expand Down

0 comments on commit 3d7421b

Please sign in to comment.