Skip to content

Fix makeRequest to return Promise for proper async chaining#26

Merged
Ephigenia merged 3 commits intogeneral-upgradefrom
copilot/sub-pr-25
Nov 26, 2025
Merged

Fix makeRequest to return Promise for proper async chaining#26
Ephigenia merged 3 commits intogeneral-upgradefrom
copilot/sub-pr-25

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

The axios migration removed the return statement from makeRequest, breaking Promise chaining and async/await usage.

Changes

  • Add return statement to makeRequest - Restores Promise return value that existed pre-migration
  • Fix optional chaining syntax - Replace ?. with && for ES6 compatibility (ecmaVersion: 6 in eslint config)
  • Update test assertions - Remove return from callback-style test calls to prevent Mocha's "overspecified resolution" error

Example

// Now works correctly
const result = await mite.getServices();

// And allows proper chaining
mite.getServices()
  .then(services => processServices(services))
  .catch(err => handleError(err));

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 26, 2025 14:00
Co-authored-by: Ephigenia <73654+Ephigenia@users.noreply.github.com>
Co-authored-by: Ephigenia <73654+Ephigenia@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dependency upgrade based on review feedback Fix makeRequest to return Promise for proper async chaining Nov 26, 2025
Copilot AI requested a review from Ephigenia November 26, 2025 14:09
@Ephigenia Ephigenia marked this pull request as ready for review November 26, 2025 15:34
@Ephigenia Ephigenia merged commit 7a48f94 into general-upgrade Nov 26, 2025
7 checks passed
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.

2 participants