File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,9 @@ export class JiraTicketProvider implements TicketProviderInterface {
165165 const summary = `[${ errorGroup . type } ] ${ errorGroup . name } ` ;
166166
167167 let description = errorGroup . name +
168- '\n\ nh3.Frequency' +
168+ '\nh3.Frequency\n ' +
169169 `${ errorGroup . count } ${ errorGroup . countType } per day` +
170- '\n\ nh3.Instances' ;
170+ '\nh3.Instances\n ' ;
171171
172172 for ( const instance of errorGroup . instances . slice ( 0 , maxInstances ) ) {
173173 description += `${ instance . name } \n\nTroubleshoot at: [${ instance . debugUrl } ]` ;
@@ -183,7 +183,12 @@ export class JiraTicketProvider implements TicketProviderInterface {
183183 summary,
184184 description,
185185 priority : this . config . ticket . priorityMap [ errorGroup . priority ] ,
186- labels : [ 'error_sync' , `error:${ errorGroup . clientId } ` ] ,
186+ labels : [
187+ 'error_sync' ,
188+ `error:${ errorGroup . clientId } ` ,
189+ errorGroup . sourceName ,
190+ errorGroup . type ,
191+ ] ,
187192 }
188193 }
189194
Original file line number Diff line number Diff line change @@ -33,10 +33,18 @@ export class OpsGenieAlertProvider implements AlertProviderInterface {
3333 public async findAlert ( clientId : string ) : Promise < Alert > {
3434 const opsgenieAlert : any = await new Promise ( ( resolve , reject ) => {
3535 opsGenie . alertV2 . get ( {
36- identifier : clientId ,
36+ identifier : clientId + 'fake' ,
3737 identifierType : 'alias' ,
3838 } , ( error , response ) => {
39- return ( error ? reject ( error ) : resolve ( response . data ) ) ;
39+ if ( ! error ) {
40+ return resolve ( response . data ) ;
41+ } else if ( error . httpStatusCode === 404 ) {
42+ return undefined ;
43+ } else if ( error instanceof Error ) {
44+ throw error ;
45+ } else {
46+ throw new Error ( error . message || error ) ;
47+ }
4048 } ) ;
4149 } ) ;
4250
You can’t perform that action at this time.
0 commit comments