You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Consecutive await automaFetch Calls Return Identical Results
Problem Description
When using await automaFetch in consecutive calls, the result of the second await is identical to the first, regardless of the second request's configuration or endpoint.
Expected Behavior
firstResponse contains the response from https://example.com/api/endpoint1.
secondResponse contains the response from https://example.com/api/endpoint2.
Actual Behavior
firstResponse correctly contains the response from https://example.com/api/endpoint1.
secondResponse erroneously contains the same response as firstResponse, even though it was expected to fetch from https://example.com/api/endpoint2.
Impact
This issue severely limits the functionality of automaFetch when multiple asynchronous requests are required. It prevents workflows from correctly handling sequential API calls with different configurations.
Suggested Fix
Investigate the internal state management of automaFetch to ensure each call independently resolves with its respective request's result.
Ensure that the response of one automaFetch call does not overwrite or persist into subsequent calls.
Environment
Automa Version: [Your version here]
Browser: [Your browser/version here]
Script/Workflow Example:
javascript
Copy code
async function testAutomaFetch() {
try {
const firstResponse = await automaFetch('json', {
url: 'https://example.com/api/endpoint1',
method: 'GET',
});
console.log('First response:', firstResponse);
Issue: Consecutive await automaFetch Calls Return Identical Results
Problem Description
When using await automaFetch in consecutive calls, the result of the second await is identical to the first, regardless of the second request's configuration or endpoint.
Reproduction Steps
Execute the following code:
javascript
Copy code
async function testAutomaFetch() {
try {
const firstResponse = await automaFetch('json', {
url: 'https://example.com/api/endpoint1',
method: 'GET',
});
console.log('First response:', firstResponse);
} catch (error) {
console.error('Error:', error.message);
}
}
testAutomaFetch();
Observe the console logs.
Expected Behavior
firstResponse contains the response from https://example.com/api/endpoint1.
secondResponse contains the response from https://example.com/api/endpoint2.
Actual Behavior
firstResponse correctly contains the response from https://example.com/api/endpoint1.
secondResponse erroneously contains the same response as firstResponse, even though it was expected to fetch from https://example.com/api/endpoint2.
Impact
This issue severely limits the functionality of automaFetch when multiple asynchronous requests are required. It prevents workflows from correctly handling sequential API calls with different configurations.
Suggested Fix
Investigate the internal state management of automaFetch to ensure each call independently resolves with its respective request's result.
Ensure that the response of one automaFetch call does not overwrite or persist into subsequent calls.
Environment
Automa Version: [Your version here]
Browser: [Your browser/version here]
Script/Workflow Example:
javascript
Copy code
async function testAutomaFetch() {
try {
const firstResponse = await automaFetch('json', {
url: 'https://example.com/api/endpoint1',
method: 'GET',
});
console.log('First response:', firstResponse);
} catch (error) {
console.error('Error:', error.message);
}
}
testAutomaFetch();
The text was updated successfully, but these errors were encountered: