Skip to content
Snippets Groups Projects
Unverified Commit a0342fee authored by Zdravko Iliev's avatar Zdravko Iliev
Browse files

fix: if the stream exists get it

parent b2e8913a
No related branches found
No related tags found
1 merge request!31ci: issuer doesn't see any new connections in GET /connections or GET /connections/:id
Pipeline #64808 passed with stage
in 1 minute and 17 seconds
......@@ -38,7 +38,7 @@ export class ConsumerService extends NatsBaseService {
return this.jsClient.consumers.get(stream, consumerConfig.name);
} catch (error) {
if (error instanceof NatsError && error.code === "409") {
if (error instanceof NatsError && error.api_error?.err_code === 10065) {
this.logger.log("Stream already exists");
return this.jsClient.consumers.get(stream, consumerConfig.name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment