Skip to content

Commit bce999b

Browse files
authored
Merge pull request #43 from hapinessjs/next
Next
2 parents b18b06e + 3cd2987 commit bce999b

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hapiness/rabbitmq",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "Hapiness module for rabbitmq",
55
"main": "commonjs/index.js",
66
"types": "index.d.ts",

src/module/rabbitmq.extension.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ export class RabbitMQExt implements OnExtensionLoad, OnModuleInstantiated, OnShu
7575
debug('connection.once#error: try to reconnect');
7676
connection
7777
.connect()
78-
.do(() => this.onModuleInstantiated(module, connection))
78+
.do(() => this.onModuleInstantiated(module, connection)
79+
.subscribe(() => {}, err => {
80+
errorHandler(err);
81+
const bootstrapError: any = new Error('Bootstrap error');
82+
bootstrapError.source = err;
83+
bootstrapError.key = 'HAPINESS_RABBITMQ_BOOTSTRAP_ERROR';
84+
connection.emit('error', bootstrapError);
85+
}))
7986
.subscribe(() => {}, err => {
8087
errorHandler(err);
8188
const connectionError: any = new Error('Connection error');

0 commit comments

Comments
 (0)