Skip to content

Commit

Permalink
Fix parsing of buddi fallback for clients iTwin#1073 (iTwin#1304)
Browse files Browse the repository at this point in the history
* imjs_buddi_resolve_url_using_region should support either string or number

* rush change logs

Co-authored-by: Arun George <[email protected]>
  • Loading branch information
aruniverse and aruniverse authored Apr 29, 2021
1 parent 51d7217 commit e93a563
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/itwin/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/** @packageDocumentation
* @module iTwinServiceClients
*/
import * as deepAssign from "deep-assign";
import { ClientRequestContext, Config, Logger } from "@bentley/bentleyjs-core";
import * as deepAssign from "deep-assign";
import { AuthorizedClientRequestContext } from "./AuthorizedClientRequestContext";
import { ITwinClientLoggerCategory } from "./ITwinClientLoggerCategory";
import { request, RequestGlobalOptions, RequestOptions, RequestTimeoutOptions, Response, ResponseError } from "./Request";
Expand Down Expand Up @@ -97,9 +97,11 @@ export abstract class Client {
if (undefined === prefix) {
const region = Config.App.query("imjs_buddi_resolve_url_using_region");
switch (region) {
case 102:
case "102":
prefix = "qa-";
break;
case 103:
case "103":
prefix = "dev-";
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@bentley/itwin-client",
"comment": "fix parsing of buddi fallback for clients. imjs_buddi_resolve_url_using_region should support both strings and numbers",
"type": "none"
}
],
"packageName": "@bentley/itwin-client",
"email": "[email protected]"
}

0 comments on commit e93a563

Please sign in to comment.