File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ export class APIConnectionBuilder implements IConnectionBuilder {
18
18
}
19
19
20
20
public async build ( options : APIOptions & BaseCloudOptions ) : Promise < IConnection > {
21
-
22
21
const { apiUrl = "https://api2.arduino.cc/iot/v1/clients/token" } = options ;
23
22
const headers = { 'content-type' : 'application/x-www-form-urlencoded' } ;
24
23
const body = {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export class HttpClientFactory {
17
17
const contentType = responseHeaders [ 'content-type' ] || '' ;
18
18
const payload = contentType . match ( 'json' ) && ! ! text ? JSON . parse ( text ) : text ;
19
19
20
- if ( response . status >= 400 ) throw new Error ( JSON . stringify ( { payload, status : response . status } ) ) ;
20
+ if ( response . status >= 400 ) throw new Error ( encodeURIComponent ( JSON . stringify ( { payload, status : response . status } ) ) ) ;
21
21
else return payload ;
22
22
}
23
23
You can’t perform that action at this time.
0 commit comments