Skip to content

Commit

Permalink
Merge pull request #1415 from CartoDB/fix/windshaft-request
Browse files Browse the repository at this point in the history
Fix Windshaft request
  • Loading branch information
elenatorro authored Nov 12, 2019
2 parents 38adc44 + 2668760 commit 57a5588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/WindshaftRequestHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class WindshaftRequestHelper {
try {
response = await fetch(this._makeHttpRequest());
} catch (error) {
throw new CartoMapsAPIError(`Failed to connect to Maps API with your user('${this._source._username}')`);
throw new CartoMapsAPIError(`Failed to connect to Maps API with your user('${this._conf.username}')`);
}

const layergroup = await response.json();
Expand All @@ -44,12 +44,12 @@ export default class WindshaftRequestHelper {
_dealWithWindshaftErrors (response, layergroup) {
if (response.status === 401) {
throw new CartoMapsAPIError(
`Unauthorized access to Maps API: invalid combination of user('${this._source._username}') and apiKey('${this._source._apiKey}')`,
`Unauthorized access to Maps API: invalid combination of user('${this._conf.username}') and apiKey('${this._conf.apiKey}')`,
CartoMapsAPIErrorTypes.SECURITY
);
} else if (response.status === 403) {
throw new CartoMapsAPIError(
`Unauthorized access to dataset: the provided apiKey('${this._source._apiKey}') doesn't provide access to the requested data`,
`Unauthorized access to dataset: the provided apiKey('${this._conf.apiKey}') doesn't provide access to the requested data`,
CartoMapsAPIErrorTypes.SECURITY
);
}
Expand Down

0 comments on commit 57a5588

Please sign in to comment.