mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-06 04:57:53 +03:00
History schema change
This commit is contained in:
@@ -141,10 +141,11 @@ export default async function fetchWithValidation<DataOut, DataIn, ErrorOut, Err
|
||||
|
||||
const payload = schema.safeParse(json);
|
||||
if (!payload.success) {
|
||||
const issuesMessages = payload.error.issues.map((issue) => issue.message).join(', ');
|
||||
return err({
|
||||
type: 'payloadParseError' as const,
|
||||
url,
|
||||
message: 'Can\'t recognize response payload',
|
||||
message: `Can't recognize response payload: ${issuesMessages}`,
|
||||
error: payload.error,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user