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

Pass 409 Conflict back to FireFly Core #137

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

nguyer
Copy link
Contributor

@nguyer nguyer commented Jun 15, 2023

A recent change in FireFly core means that now sometimes conflict detection will be handled by the blockchain connector itself. This means that we need to pass this status back to FireFly core, rather than always returning 500 here.

Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
@@ -94,7 +96,13 @@ export class BlockchainConnectorService {
this.logger.warn(
`${request?.path} <-- HTTP ${response?.status} ${response?.statusText}: ${errorMessage}`,
);
throw new InternalServerErrorException(errorMessage);
if (response?.status == HttpStatus.CONFLICT) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Highlighting (for the record) that we'll generally only reach this block for a "non-retryable" error. The default configuration for which errors are retryable seems to be only those whose error text matches the regex .*ECONN.* (although it can be overridden).

So I think unless you override the retry config to be very generic, 409s should generally bubble up to here, and therefore bubble up to FireFly.

@awrichar
Copy link
Contributor

We'll want to port this to ERC1155 as well.

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