@tinycloud/sdk-services 3.2.0-beta.7 → 3.2.0-beta.8

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.
package/dist/index.js CHANGED
@@ -5081,14 +5081,12 @@ async function responseError(service, message, response) {
5081
5081
  }
5082
5082
  } catch {
5083
5083
  }
5084
- const error = wrapError(
5084
+ return serviceError(
5085
+ response.status === 408 || response.status === 504 ? ErrorCodes.TIMEOUT : ErrorCodes.NETWORK_ERROR,
5086
+ `${message}: ${response.status} ${detail}`,
5085
5087
  service,
5086
- new Error(`${message}: ${response.status} ${detail}`)
5088
+ { meta: { status: response.status, statusText: response.statusText } }
5087
5089
  );
5088
- return {
5089
- ...error,
5090
- meta: { ...error.meta, status: response.status, statusText: response.statusText }
5091
- };
5092
5090
  }
5093
5091
  async function* parseSseStream(body, signal) {
5094
5092
  if (!body) {