@overmap-ai/core 1.0.65-error-message-fix.5 → 1.0.65-error-message-fix.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4056,29 +4056,23 @@ var __publicField = (obj, key, value) => {
4056
4056
  }
4057
4057
  async initAuth(payload) {
4058
4058
  const uuid$1 = uuid.v4();
4059
- const promise = this.enqueueRequest({
4060
- uuid: uuid$1,
4061
- description: "Get token pair",
4062
- method: HttpMethod.POST,
4063
- url: this.initTokensUrl,
4064
- payload,
4065
- isAuthNeeded: false,
4066
- checkAuth: false,
4067
- blockers: [],
4068
- blocks: []
4069
- }).then(parseTokens);
4070
- const timeout = 10;
4071
- let timedOut = false;
4072
- setTimeout(() => {
4073
- timedOut = true;
4059
+ try {
4060
+ const result = await this.enqueueRequest({
4061
+ uuid: uuid$1,
4062
+ description: "Get token pair",
4063
+ method: HttpMethod.POST,
4064
+ url: this.initTokensUrl,
4065
+ payload,
4066
+ isAuthNeeded: false,
4067
+ checkAuth: false,
4068
+ blockers: [],
4069
+ blocks: []
4070
+ });
4071
+ this.setTokens(parseTokens(result));
4072
+ } catch (e) {
4074
4073
  this.dispatch(markForDeletion(uuid$1));
4075
- }, timeout * 1e3);
4076
- void promise.then((tokens) => {
4077
- if (timedOut)
4078
- return;
4079
- this.setTokens(tokens);
4080
- });
4081
- return promise;
4074
+ throw e;
4075
+ }
4082
4076
  }
4083
4077
  }
4084
4078
  class BaseApiService extends BaseService {