@greymass/eosio
Advanced tools
Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "@greymass/eosio", | ||
"description": "Library for working with EOSIO blockchains", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"homepage": "https://github.com/greymass/eosio-core", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause-No-Military-License", |
@@ -70,3 +70,4 @@ import {APIProvider, APIResponse, FetchProvider, FetchProviderOptions} from './provider' | ||
get error() { | ||
return this.response.json?.error as APIErrorData | undefined | ||
const {json} = this.response | ||
return (json ? json.error : undefined) as APIErrorData | undefined | ||
} | ||
@@ -76,3 +77,4 @@ | ||
get name() { | ||
return this.error?.name || 'unspecified' | ||
const {error} = this | ||
return error ? error.name : 'unspecified' | ||
} | ||
@@ -82,3 +84,4 @@ | ||
get code() { | ||
return this.error?.code || 0 | ||
const {error} = this | ||
return error ? error.code : 0 | ||
} | ||
@@ -88,3 +91,4 @@ | ||
get details() { | ||
return this.error?.details || [] | ||
const {error} = this | ||
return error ? error.details : [] | ||
} | ||
@@ -126,3 +130,4 @@ } | ||
const response = await this.provider.call(args.path, args.params) | ||
if (Math.floor(response.status / 100) !== 2 || typeof response.json?.error === 'object') { | ||
const {json} = response | ||
if (Math.floor(response.status / 100) !== 2 || (json && typeof json.error === 'object')) { | ||
throw new APIError(args.path, response) | ||
@@ -129,0 +134,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
810781
16174