File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ const handler: Handler = async (payload: Payload) => {
18
18
headers : headers ,
19
19
} ) ;
20
20
21
- if ( response . status === 200 || response . status === 202 ) {
22
- console . log ( `Alert sent to API successfully with status ${ response . status } ` ) ;
21
+ if ( response . status >= 200 && response . status <= 206 ) {
22
+ console . log ( `Resquest sent to API successfully with status ${ response . status } ` ) ;
23
23
} else {
24
- console . error ( `Failed to send alert to API. Status code: ${ response . status } , Response: ${ response . data } ` ) ;
24
+ console . error ( `Failed to send resquest to API. Status code: ${ response . status } , Response: ${ response . data } ` ) ;
25
25
}
26
26
} catch ( error ) {
27
- console . error ( 'Error sending alert to API:' , error . message ) ;
27
+ console . error ( 'Error sending resquest to API:' , error . message ) ;
28
28
}
29
29
30
30
You can’t perform that action at this time.
0 commit comments