Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Show an error key for payloads when remote decoder fails. (#439)
Browse files Browse the repository at this point in the history
* Show an error key for payloads when remote decoder fails.
  • Loading branch information
robholland committed Mar 2, 2022
1 parent 271c184 commit b0c3922
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/features/data-conversion.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ export const convertEventPayloadsWithRemoteEncoder = async (events, endpoint) =>
}
});
})
.catch(() => {
payloadsWrapper.payloads.forEach((payload) => {
payload.error = "Could not decode payload, remote decoder returned an error."
})
})
)
})

await Promise.allSettled(requests);
// We catch and handle errors above so no error handling needed here.
await Promise.all(requests);

return events;
};
Expand Down

0 comments on commit b0c3922

Please sign in to comment.