mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 22:52:36 +03:00
Orion, Orion Unit, Configuration (#40)
* Refactoring * Better docs * Bump * ESLint standard * Fix * Bumo * VerboseOrionUnitConfig to types * Docs improvements * Docs improvements. Orion default env
This commit is contained in:
@@ -117,7 +117,7 @@ export default async function fetchWithValidation<DataOut, DataIn, ErrorOut, Err
|
||||
return err({
|
||||
type: 'clientErrorWithResponsePayload' as const,
|
||||
url,
|
||||
message: `Client error: ${response.status} ${response.statusText}`,
|
||||
message: `Client error: ${response.status} ${response.statusText}. Server error: ${JSON.stringify(serverError.data)}`,
|
||||
status: response.status,
|
||||
payload: serverError.data,
|
||||
});
|
||||
@@ -125,7 +125,7 @@ export default async function fetchWithValidation<DataOut, DataIn, ErrorOut, Err
|
||||
return err({
|
||||
type: 'clientErrorPayloadParseError' as const,
|
||||
url,
|
||||
message: 'Can\'t recognize error message',
|
||||
message: 'Can\'t recognize error message. Response: ' + text,
|
||||
status: response.status,
|
||||
text,
|
||||
error: serverError.error,
|
||||
@@ -134,7 +134,7 @@ export default async function fetchWithValidation<DataOut, DataIn, ErrorOut, Err
|
||||
return err({
|
||||
type: 'clientError' as const,
|
||||
url,
|
||||
message: `Error: ${response.status} ${response.statusText}`,
|
||||
message: `Error: ${response.status} ${response.statusText}. Response: ${text}`,
|
||||
status: response.status,
|
||||
text,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user