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(GuildEmojiManager): throw an error if image resolving fails #3934

Merged

Conversation

@SpaceEEC
Copy link
Member

SpaceEEC commented Mar 12, 2020

Please describe the changes this PR makes and why it should be merged:

This PR fixes #3933.

The method was recursing endlessly if anything falsy (such as omitting the parameter) was passed as attachment.

I moved the DataResolver#resolveImage call to the top of the method and made the method throw an error (REQ_RESOURCE_TYPE) if resolving failed.

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.
@iCrawl
iCrawl approved these changes Mar 14, 2020
@iCrawl iCrawl merged commit ca75eb5 into discordjs:master Mar 14, 2020
3 checks passed
3 checks passed
ESLint
Details
TSLint
Details
Documentation
Details
@SpaceEEC SpaceEEC deleted the SpaceEEC:fix/guild_emoji_manager_create_resolve_image branch Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.