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

feat: Improve error handling while communicating with Marketplace #35005

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Gustrb
Copy link
Contributor

@Gustrb Gustrb commented Jan 22, 2025

Proposed changes (including videos or screenshots)

Introduce a new MarketplaceErrorHandler class that is going to be responsible for parsing marketplace-api errors and return the according error message strings from it.

Issue(s)

Steps to test or reproduce

Since we depend on having marketplace throwing errors to test this feature, I created a simple application that works as a proxy for marketplace, you can check it over here: https://github.com/Gustrb/api-stubber
It is pretty simple, and to run Rocket.Chat pointing at it instead of the actual marketplace one can simply:

$ OVERWRITE_MARKETPLACE_URL=http://localhost:3001 yarn dsv

Note: This assumes you are running the proxy at port 3001, while the default is 3000, this is done since the Rocket.Chat default port is also 3000.

Then, to test specific errors, you can tweak the config.json file

Further comments

CONN-64

Copy link

changeset-bot bot commented Jan 22, 2025

⚠️ No Changeset found

Latest commit: 46234ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

dionisio-bot bot commented Jan 22, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link
Contributor

github-actions bot commented Jan 22, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35005/

Built to branch gh-pages at 2025-01-23 15:18 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.17%. Comparing base (a5b4584) to head (46234ac).
Report is 10 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #35005   +/-   ##
========================================
  Coverage    59.17%   59.17%           
========================================
  Files         2822     2822           
  Lines        68124    68124           
  Branches     15149    15149           
========================================
  Hits         40314    40314           
  Misses       24978    24978           
  Partials      2832     2832           
Flag Coverage Δ
unit 75.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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