@@ -89,25 +89,27 @@ async function main() {
8989
9090 console . log ( `Uploading results to the file storage service` ) ;
9191
92- await axios . put ( resultUploadUrl , findingsWithIds ) . catch ( function ( error ) {
93- if ( error . response ) {
94- // The request was made and the server responded with a status code
95- // that falls out of the range of 2xx
96- console . error (
97- `Finding Upload Failed with Response Code: ${ error . response . status } `
98- ) ;
99- console . error ( `Error Response Body: ${ error . response . data } ` ) ;
100- } else if ( error . request ) {
101- console . error (
102- "No response received from FileStorage when uploading finding"
103- ) ;
104- console . error ( error ) ;
105- } else {
106- // Something happened in setting up the request that triggered an Error
107- console . log ( "Error" , error . message ) ;
108- }
109- process . exit ( 1 ) ;
110- } ) ;
92+ await axios
93+ . put ( resultUploadUrl , findingsWithIds , { headers : { "content-type" : "" } } )
94+ . catch ( function ( error ) {
95+ if ( error . response ) {
96+ // The request was made and the server responded with a status code
97+ // that falls out of the range of 2xx
98+ console . error (
99+ `Finding Upload Failed with Response Code: ${ error . response . status } `
100+ ) ;
101+ console . error ( `Error Response Body: ${ error . response . data } ` ) ;
102+ } else if ( error . request ) {
103+ console . error (
104+ "No response received from FileStorage when uploading finding"
105+ ) ;
106+ console . error ( error ) ;
107+ } else {
108+ // Something happened in setting up the request that triggered an Error
109+ console . log ( "Error" , error . message ) ;
110+ }
111+ process . exit ( 1 ) ;
112+ } ) ;
111113
112114 console . log ( `Completed parser` ) ;
113115}
0 commit comments