Skip to content

[Components] remote_retrieval #12998 #13716

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 12 commits into from
Dec 10, 2024
Merged

[Components] remote_retrieval #12998 #13716

merged 12 commits into from
Dec 10, 2024

Conversation

lcaresia
Copy link
Collaborator

@lcaresia lcaresia commented Aug 27, 2024

WHY

Summary by CodeRabbit

  • New Features

    • Introduced actions for creating and retrieving orders, including detailed order creation and retrieval functionalities.
    • Enhanced order creation with comprehensive input fields for employee and company information.
    • Added a new action to retrieve a list of all orders.
  • Removed Features

    • Deprecated actions for retrieving pending orders and specific orders.
  • Bug Fixes

    • Minor version updates for existing actions to ensure stability and performance.
  • Documentation

    • Updated the application structure and API interaction methods for improved usability and clarity.

@lcaresia lcaresia self-assigned this Aug 27, 2024
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pipedream ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 6:22pm
pipedream-sdk-example-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 6:22pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 10, 2024 6:22pm
pipedream-docs ⬜️ Ignored (Inspect) Dec 10, 2024 6:22pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Dec 10, 2024 6:22pm

@lcaresia lcaresia linked an issue Aug 27, 2024 that may be closed by this pull request
Copy link
Contributor

coderabbitai bot commented Aug 27, 2024

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes introduce new actions for order management within the Remote Retrieval application, specifically for creating and retrieving orders. A new module for creating orders has been added, along with modules for retrieving order details and lists of orders. Additionally, two existing modules for retrieving pending and specific orders have been removed. The modifications enhance the application's ability to manage order data effectively through structured input and asynchronous operations.

Changes

Files Change Summary
components/remote_retrieval/actions/create-order/create-order.mjs Introduced action for creating orders with structured input for employee and company information.
components/remote_retrieval/actions/get-order-details/get-order-details.mjs Added action to retrieve specific order details by order ID.
components/remote_retrieval/actions/get-orders/get-orders.mjs Added action to retrieve a list of all orders.
components/remote_retrieval/actions/get-pending-orders/get-pending-orders.mjs Deleted action for retrieving pending orders.
components/remote_retrieval/actions/get-specific-order/get-specific-order.mjs Deleted action for retrieving a specific order.

Possibly related PRs

Suggested labels

action, trigger / source

Suggested reviewers

  • jcortes

🐰 In the meadow, orders bloom,
A rabbit hops, dispelling gloom.
With new actions, swift and bright,
Creating orders, what a delight!
From pending to completed, all in sight,
The retrieval's magic takes flight! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lcaresia, I just added a minor suggestion!

luancazarine
luancazarine previously approved these changes Sep 9, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
components/remote_retrieval/actions/get-order-details/get-order-details.mjs (1)

6-6: LGTM!

The description clearly explains the purpose of the action and includes a helpful link to the API documentation for the order detail endpoint.

Consider adding a brief description of the key information returned in the order details, such as the order status, items, and shipping details, to give users a better understanding of what to expect from the API response.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between baaf485 and 339d4f5.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (10)
  • components/remote_retrieval/actions/create-order/create-order.mjs (1 hunks)
  • components/remote_retrieval/actions/get-completed-orders/get-completed-orders.mjs (1 hunks)
  • components/remote_retrieval/actions/get-new-orders/get-new-orders.mjs (1 hunks)
  • components/remote_retrieval/actions/get-order-details/get-order-details.mjs (1 hunks)
  • components/remote_retrieval/actions/get-orders/get-orders.mjs (1 hunks)
  • components/remote_retrieval/actions/get-pending-orders/get-pending-orders.mjs (1 hunks)
  • components/remote_retrieval/actions/get-specific-order/get-specific-order.mjs (1 hunks)
  • components/remote_retrieval/common/constants.mjs (1 hunks)
  • components/remote_retrieval/package.json (2 hunks)
  • components/remote_retrieval/remote_retrieval.app.mjs (1 hunks)
Files skipped from review due to trivial changes (3)
  • components/remote_retrieval/actions/get-pending-orders/get-pending-orders.mjs
  • components/remote_retrieval/actions/get-specific-order/get-specific-order.mjs
  • components/remote_retrieval/package.json
Additional comments not posted (38)
components/remote_retrieval/common/constants.mjs (1)

1-9: LGTM! The new constants provide a more structured approach.

The introduction of EQUIPMENT_TYPES and ORDER_TYPES constants is a good change that can help maintain consistency and avoid typos in the codebase. Consider using these constants for validation or selection within the application logic.

Verify that the removal of the previous constants (BASE_URL, VERSION_PATH, DEFAULT_MAX) does not break any existing functionality. Run the following script to search for their usage in the codebase:

Verification successful

Removal of constants appears safe, but manual verification recommended

Based on the thorough search of the codebase, it appears that the removal of the constants BASE_URL, VERSION_PATH, and DEFAULT_MAX from components/remote_retrieval/common/constants.mjs is safe and doesn't impact other parts of the codebase. No direct usage or imports of these constants were found.

However, as a precautionary measure, I recommend a manual verification of the changes, particularly in areas of the codebase that deal with remote retrieval functionality. This will ensure that no edge cases or dynamically generated references were missed by the automated search.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for usage of the removed constants in the codebase.

# Test: Search for the constant names. Expect: No occurrences.
rg --type js $'BASE_URL|VERSION_PATH|DEFAULT_MAX'

Length of output: 339


Script:

#!/bin/bash
# Description: Search for partial matches of the removed constants and imports of the constants file.

# Search for partial matches of the constant names
echo "Searching for partial matches of removed constants:"
rg --type js -i '(base.*url|version.*path|default.*max)'

# Search for imports of the constants file
echo -e "\nSearching for imports of the constants file:"
rg --type js 'import.*from.*components/remote_retrieval/common/constants'

Length of output: 2030

components/remote_retrieval/actions/get-orders/get-orders.mjs (4)

1-2: LGTM!

The import statement is syntactically correct and follows the expected pattern for importing an app instance from a separate file within the same component.


3-11: LGTM!

The exported object follows the expected structure for defining an action, with appropriate metadata properties. The inclusion of the API documentation link in the description is helpful for users. The app instance is correctly included in the props.


12-18: LGTM!

The async run method is well-structured and follows best practices:

  • It correctly destructures the $ object from the input context.
  • It calls the getOrders method with the expected arguments.
  • It exports a helpful summary message for user feedback.
  • It returns the full API response for flexibility in handling the retrieved data.

19-19: LGTM!

The exported object is correctly closed with a semicolon.

components/remote_retrieval/actions/get-new-orders/get-new-orders.mjs (3)

1-2: LGTM!

The import statement is correct and the imported app object is used appropriately in the file.


3-17: LGTM!

The exported object follows the expected structure and includes the correct properties.

Apply the following suggestion from the past review comment:

  description: "Get a list of new orders. [See the documentation](https://www.remoteretrieval.com/api-documentation/#new-orders)",

18-27: LGTM!

The run method is correctly defined and calls the getNewOrders method with the appropriate parameters. The summary message is exported correctly and the response is returned.

components/remote_retrieval/actions/get-order-details/get-order-details.mjs (4)

1-2: LGTM!

The import statement is correctly defined and the app module is likely to be used in the action definition.


3-17: LGTM!

The exported object is well-defined with appropriate properties for the action. The props definition correctly includes the required app and orderId properties, with the orderId property referencing the definition from the app module.


18-27: LGTM!

The run method is well-implemented as an asynchronous function. It correctly calls the getOrderDetails function with the appropriate parameters, exports a summary message upon successful retrieval, and returns the response data from the API call.


25-25: LGTM!

The exported summary message provides useful information about the successful retrieval of order details and includes the orderId to identify the specific order.

components/remote_retrieval/actions/get-completed-orders/get-completed-orders.mjs (4)

1-8: LGTM!

The import statement and the exported object metadata are well-structured and follow the conventions. The metadata provides clear and concise information about the action, including a link to the relevant API documentation.


9-17: LGTM!

The props object is well-structured and follows the conventions. The page property is correctly defined using the propDefinition array, which references the app module and the "page" key.


18-27: LGTM!

The run method is well-structured and follows the conventions. The method correctly calls the getCompletedOrders method from the app module, passing the required arguments. The summary message is exported using $.export, and the API response is returned, allowing further processing or display of the completed orders.


1-28: Excellent work!

The get-completed-orders.mjs file is a complete and well-structured action that follows the conventions and best practices. The action is well-documented, modular, reusable, and testable. It includes all the necessary components, such as the import statement, exported object metadata, props object, and run method. The code is clean, concise, and easy to understand. Great job!

components/remote_retrieval/remote_retrieval.app.mjs (20)

8-22: LGTM!

The property name change and the updated options method improve clarity and provide more relevant data.


23-28: LGTM!

The new property adds a useful field to capture the type of equipment, and the options are fetched from a constants file, which is a good practice.


29-34: LGTM!

The new property adds a useful field to capture the type of order, and the options are fetched from a constants file, which is a good practice.


35-39: LGTM!

The new property adds a useful field to capture the employee email address.


40-44: LGTM!

The new property adds a useful field to capture the employee full name.


45-49: LGTM!

The new property adds a useful field to capture the employee address line 1.


50-55: LGTM!

The new optional property adds a useful field to capture the employee address line 2 when available.


56-60: LGTM!

The new property adds a useful field to capture the employee city.


61-65: LGTM!

The new property adds a useful field to capture the employee state.


66-70: LGTM!

The new property adds a useful field to capture the employee country.


71-75: LGTM!

The new property adds a useful field to capture the employee zip code.


76-80: LGTM!

The new property adds a useful field to capture the employee phone number.


81-85: LGTM!

The new property adds a useful field to capture the company person name.


86-90: LGTM!

The new property adds a useful field to capture the company name.


91-95: LGTM!

The new property adds a useful field to capture the company address line 1.


96-101: LGTM!

The new optional property adds a useful field to capture the company address line 2 when available.


102-106: LGTM!

The new property adds a useful field to capture the company city.


107-111: LGTM!

The new property adds a useful field to capture the company state.


112-116: LGTM!

The new property adds a useful field to capture the company country.


117-121: LGTM!

The new property adds a useful field to capture the company zip code.

components/remote_retrieval/actions/create-order/create-order.mjs (2)

3-137: LGTM!

The action definition looks good:

  • The key, name, description, version, and type properties are properly defined.
  • The props property defines a comprehensive set of input properties for collecting order details.
  • The input properties are defined using the propDefinition property, which references the app object and the corresponding property name.

139-199: LGTM!

The run method looks good:

  • The method logs the input property values to the console for debugging purposes.
  • The method calls the createOrder method of the app object, passing the input property values as data.
  • The data is structured correctly, with the employee information and company information nested within the order object.
  • The method exports a summary message indicating the successful creation of the order.
  • The method returns the response from the createOrder method, allowing the caller to handle the result of the order creation process.

@lcaresia
Copy link
Collaborator Author

/approve

luancazarine
luancazarine previously approved these changes Sep 23, 2024
Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lcaresia, LGTM! Ready for QA!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (3)
components/remote_retrieval/actions/get-orders/get-orders.mjs (1)

12-18: Consider implementing pagination handling

The current implementation fetches all orders at once, which could cause performance issues with large datasets. Consider:

  1. Adding pagination parameters
  2. Implementing cursor-based pagination if supported by the API
  3. Adding a limit parameter to control result size
components/remote_retrieval/actions/create-order/create-order.mjs (2)

35-70: Consider refactoring address structure

The current implementation duplicates address field definitions for both employee and return addresses. Consider creating a reusable address prop structure to reduce duplication.

+ const createAddressProps = (prefix = '') => ({
+   [`${prefix}AddressLine1`]: {
+     propDefinition: [app, "addressLine1"],
+   },
+   [`${prefix}AddressLine2`]: {
+     propDefinition: [app, "addressLine2"],
+   },
+   // ... other address fields
+ });

 export default {
   props: {
     app,
     // ... other props
-    addressLine1: {
-      propDefinition: [app, "addressLine1"],
-    },
-    // ... other address fields
+    ...createAddressProps(),
+    ...createAddressProps('return'),
   },
 }

Also applies to: 89-124


197-197: Enhance success message with order details

The current success message is too generic. Include relevant order details in the summary.

- $.export("$summary", "Successfully created order");
+ $.export("$summary", `Successfully created order for ${this.name} (${this.email})`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 339d4f5 and b9276cf.

📒 Files selected for processing (5)
  • components/remote_retrieval/actions/create-order/create-order.mjs (1 hunks)
  • components/remote_retrieval/actions/get-order-details/get-order-details.mjs (1 hunks)
  • components/remote_retrieval/actions/get-orders/get-orders.mjs (1 hunks)
  • components/remote_retrieval/actions/get-pending-orders/get-pending-orders.mjs (0 hunks)
  • components/remote_retrieval/actions/get-specific-order/get-specific-order.mjs (0 hunks)
💤 Files with no reviewable changes (2)
  • components/remote_retrieval/actions/get-pending-orders/get-pending-orders.mjs
  • components/remote_retrieval/actions/get-specific-order/get-specific-order.mjs

Comment on lines +12 to +18
async run({ $ }) {
const response = await this.app.getOrders({
$,
});
$.export("$summary", `Successfully retrieved ${response.results.length} orders`);
return response;
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling

The run method should include proper error handling to provide meaningful feedback when API calls fail.

 async run({ $ }) {
+  try {
     const response = await this.app.getOrders({
       $,
     });
     $.export("$summary", `Successfully retrieved ${response.results.length} orders`);
     return response;
+  } catch (error) {
+    $.export("$summary", `Failed to retrieve orders: ${error.message}`);
+    throw error;
+  }
 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async run({ $ }) {
const response = await this.app.getOrders({
$,
});
$.export("$summary", `Successfully retrieved ${response.results.length} orders`);
return response;
},
async run({ $ }) {
try {
const response = await this.app.getOrders({
$,
});
$.export("$summary", `Successfully retrieved ${response.results.length} orders`);
return response;
} catch (error) {
$.export("$summary", `Failed to retrieve orders: ${error.message}`);
throw error;
}
},

Comment on lines +18 to +27
async run({ $ }) {
const response = await this.app.getOrderDetails({
$,
params: {
ORDER_ID: this.orderId,
},
});
$.export("$summary", `Successfully retrieved details of order with ID '${this.orderId}'`);
return response;
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add error handling and input validation

The run method needs proper error handling and input validation:

  1. Validate orderId format before API call
  2. Handle API errors gracefully
  3. Consider adding request timeout
 async run({ $ }) {
+  if (!this.orderId) {
+    throw new Error("Order ID is required");
+  }
+  try {
     const response = await this.app.getOrderDetails({
       $,
       params: {
         ORDER_ID: this.orderId,
       },
     });
     $.export("$summary", `Successfully retrieved details of order with ID '${this.orderId}'`);
     return response;
+  } catch (error) {
+    $.export("$summary", `Failed to retrieve order details: ${error.message}`);
+    throw error;
+  }
 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async run({ $ }) {
const response = await this.app.getOrderDetails({
$,
params: {
ORDER_ID: this.orderId,
},
});
$.export("$summary", `Successfully retrieved details of order with ID '${this.orderId}'`);
return response;
},
async run({ $ }) {
if (!this.orderId) {
throw new Error("Order ID is required");
}
try {
const response = await this.app.getOrderDetails({
$,
params: {
ORDER_ID: this.orderId,
},
});
$.export("$summary", `Successfully retrieved details of order with ID '${this.orderId}'`);
return response;
} catch (error) {
$.export("$summary", `Failed to retrieve order details: ${error.message}`);
throw error;
}
},

Comment on lines 140 to 162
console.log({
typeOfEquipment: this.typeOfEquipment,
orderType: this.orderType,
email: this.email,
name: this.name,
addressLine1: this.addressLine1,
addressLine2: this.addressLine2,
addressCity: this.addressCity,
addressState: this.addressState,
addressCountry: this.addressCountry,
addressZip: this.addressZip,
phone: this.phone,
returnPersonName: this.returnPersonName,
returnCompanyName: this.returnCompanyName,
returnAddressLine1: this.returnAddressLine1,
returnAddressLine2: this.returnAddressLine2,
returnAddressCity: this.returnAddressCity,
returnAddressState: this.returnAddressState,
returnAddressCountry: this.returnAddressCountry,
returnAddressZip: this.returnAddressZip,
companyEmail: this.companyEmail,
companyPhone: this.companyPhone,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove debug console.log statement

The console.log statement contains sensitive PII (email, phone, address) and should be removed from production code. Consider using proper logging levels if debugging is needed.

- console.log({
-   typeOfEquipment: this.typeOfEquipment,
-   orderType: this.orderType,
-   // ... removed for brevity
- });

Comment on lines +163 to +196
const response = await this.app.createOrder({
$,
data: {
orders: [
{
type_of_equipment: this.typeOfEquipment,
order_type: this.orderType,
employee_info: {
email: this.email,
name: this.name,
address_line_1: this.addressLine1,
address_line_2: this.addressLine2 || "",
address_city: this.addressCity,
address_state: this.addressState,
address_country: this.addressCountry,
address_zip: this.addressZip,
phone: this.phone,
},
company_info: {
return_person_name: this.returnPersonName,
return_company_name: this.returnCompanyName,
return_address_line_1: this.returnAddressLine1,
return_address_line_2: this.returnAddressLine2 || "",
return_address_city: this.returnAddressCity,
return_address_state: this.returnAddressState,
return_address_country: this.returnAddressCountry,
return_address_zip: this.returnAddressZip,
email: this.companyEmail,
phone: this.companyPhone,
},
},
],
},
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add input validation and error handling

The order creation lacks proper validation and error handling:

  1. Required fields should be validated
  2. Address format should be validated
  3. Email and phone formats should be verified
  4. API errors should be handled gracefully
 async run({ $ }) {
+  // Validate required fields
+  const requiredFields = ['email', 'name', 'addressLine1', 'addressCity', 'addressState'];
+  for (const field of requiredFields) {
+    if (!this[field]) {
+      throw new Error(`${field} is required`);
+    }
+  }
+
+  // Validate email format
+  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.email)) {
+    throw new Error('Invalid email format');
+  }
+
+  try {
     const response = await this.app.createOrder({
       // ... existing code
     });
     $.export("$summary", "Successfully created order");
     return response;
+  } catch (error) {
+    $.export("$summary", `Failed to create order: ${error.message}`);
+    throw error;
+  }
 },

Committable suggestion skipped: line range outside the PR's diff.

@lcaresia
Copy link
Collaborator Author

/approve

@lcaresia lcaresia merged commit 28ddba7 into master Dec 10, 2024
11 checks passed
@lcaresia lcaresia deleted the issue-12998 branch December 10, 2024 22:29
This was referenced Dec 27, 2024
This was referenced Jan 16, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Components] remote_retrieval
2 participants