@0xsequence/marketplace 2.3.32 → 2.3.34
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/0xsequence-marketplace.cjs.dev.js +288 -136
- package/dist/0xsequence-marketplace.cjs.prod.js +288 -136
- package/dist/0xsequence-marketplace.esm.js +272 -133
- package/dist/declarations/src/marketplace.gen.d.ts +153 -70
- package/package.json +1 -1
- package/src/marketplace.gen.ts +462 -194
package/src/marketplace.gen.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// marketplace-api
|
|
2
|
+
// marketplace-api 652676d9951ceb12f6846907c7c4b5160c73c57a
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.
|
|
4
|
+
// Code generated by webrpc-gen@v0.30.2 with github.com/webrpc/gen-typescript@v0.19.0 generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
|
-
// webrpc-gen -schema
|
|
6
|
+
// webrpc-gen -schema=./schema/schema.ridl -target=github.com/webrpc/gen-typescript@v0.19.0 -client -out=./clients/marketplace.gen.ts
|
|
7
7
|
|
|
8
8
|
export const WebrpcHeader = 'Webrpc'
|
|
9
9
|
|
|
10
10
|
export const WebrpcHeaderValue =
|
|
11
|
-
'webrpc@v0.
|
|
11
|
+
'webrpc@v0.30.2;gen-typescript@v0.19.0;marketplace-api@v0.0.0-652676d9951ceb12f6846907c7c4b5160c73c57a'
|
|
12
12
|
|
|
13
13
|
// WebRPC description and code-gen version
|
|
14
14
|
export const WebRPCVersion = 'v1'
|
|
@@ -17,7 +17,7 @@ export const WebRPCVersion = 'v1'
|
|
|
17
17
|
export const WebRPCSchemaVersion = ''
|
|
18
18
|
|
|
19
19
|
// Schema hash generated from your RIDL schema
|
|
20
|
-
export const WebRPCSchemaHash = '
|
|
20
|
+
export const WebRPCSchemaHash = '652676d9951ceb12f6846907c7c4b5160c73c57a'
|
|
21
21
|
|
|
22
22
|
type WebrpcGenVersions = {
|
|
23
23
|
webrpcGenVersion: string
|
|
@@ -71,45 +71,6 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
|
71
71
|
// Types
|
|
72
72
|
//
|
|
73
73
|
|
|
74
|
-
export enum MetadataStatus {
|
|
75
|
-
NOT_AVAILABLE = 'NOT_AVAILABLE',
|
|
76
|
-
REFRESHING = 'REFRESHING',
|
|
77
|
-
AVAILABLE = 'AVAILABLE'
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface TokenMetadata {
|
|
81
|
-
tokenId: string
|
|
82
|
-
name: string
|
|
83
|
-
description?: string
|
|
84
|
-
image?: string
|
|
85
|
-
video?: string
|
|
86
|
-
audio?: string
|
|
87
|
-
properties?: { [key: string]: any }
|
|
88
|
-
attributes: Array<{ [key: string]: any }>
|
|
89
|
-
image_data?: string
|
|
90
|
-
external_url?: string
|
|
91
|
-
background_color?: string
|
|
92
|
-
animation_url?: string
|
|
93
|
-
decimals?: number
|
|
94
|
-
updatedAt?: string
|
|
95
|
-
assets?: Array<Asset>
|
|
96
|
-
status: MetadataStatus
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface Asset {
|
|
100
|
-
id: number
|
|
101
|
-
collectionId: number
|
|
102
|
-
tokenId: string
|
|
103
|
-
url?: string
|
|
104
|
-
metadataField: string
|
|
105
|
-
name?: string
|
|
106
|
-
filesize?: number
|
|
107
|
-
mimeType?: string
|
|
108
|
-
width?: number
|
|
109
|
-
height?: number
|
|
110
|
-
updatedAt?: string
|
|
111
|
-
}
|
|
112
|
-
|
|
113
74
|
export enum SortOrder {
|
|
114
75
|
ASC = 'ASC',
|
|
115
76
|
DESC = 'DESC'
|
|
@@ -322,6 +283,12 @@ export enum PrimarySaleItemDetailType {
|
|
|
322
283
|
individual = 'individual'
|
|
323
284
|
}
|
|
324
285
|
|
|
286
|
+
export enum MetadataStatus {
|
|
287
|
+
NOT_AVAILABLE = 'NOT_AVAILABLE',
|
|
288
|
+
REFRESHING = 'REFRESHING',
|
|
289
|
+
AVAILABLE = 'AVAILABLE'
|
|
290
|
+
}
|
|
291
|
+
|
|
325
292
|
export interface Page {
|
|
326
293
|
page: number
|
|
327
294
|
pageSize: number
|
|
@@ -592,9 +559,9 @@ export interface ExecuteInput {
|
|
|
592
559
|
signature: string
|
|
593
560
|
method: string
|
|
594
561
|
endpoint: string
|
|
595
|
-
slug: string
|
|
596
562
|
executeType: ExecuteType
|
|
597
563
|
body: any
|
|
564
|
+
slug?: string
|
|
598
565
|
}
|
|
599
566
|
|
|
600
567
|
export interface Activity {
|
|
@@ -670,6 +637,39 @@ export interface PrimarySaleItemsFilter {
|
|
|
670
637
|
endDateBefore?: string
|
|
671
638
|
}
|
|
672
639
|
|
|
640
|
+
export interface TokenMetadata {
|
|
641
|
+
tokenId: string
|
|
642
|
+
name: string
|
|
643
|
+
description?: string
|
|
644
|
+
image?: string
|
|
645
|
+
video?: string
|
|
646
|
+
audio?: string
|
|
647
|
+
properties?: { [key: string]: any }
|
|
648
|
+
attributes: Array<{ [key: string]: any }>
|
|
649
|
+
image_data?: string
|
|
650
|
+
external_url?: string
|
|
651
|
+
background_color?: string
|
|
652
|
+
animation_url?: string
|
|
653
|
+
decimals?: number
|
|
654
|
+
updatedAt?: string
|
|
655
|
+
assets?: Array<Asset>
|
|
656
|
+
status: MetadataStatus
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface Asset {
|
|
660
|
+
id: number
|
|
661
|
+
collectionId: number
|
|
662
|
+
tokenId: string
|
|
663
|
+
url?: string
|
|
664
|
+
metadataField: string
|
|
665
|
+
name?: string
|
|
666
|
+
filesize?: number
|
|
667
|
+
mimeType?: string
|
|
668
|
+
width?: number
|
|
669
|
+
height?: number
|
|
670
|
+
updatedAt?: string
|
|
671
|
+
}
|
|
672
|
+
|
|
673
673
|
export interface Admin {
|
|
674
674
|
createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn>
|
|
675
675
|
getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionReturn>
|
|
@@ -819,6 +819,16 @@ export interface AddCollectiblesReturn {}
|
|
|
819
819
|
export interface Marketplace {
|
|
820
820
|
listCurrencies(args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
821
821
|
getCollectionDetail(args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionDetailReturn>
|
|
822
|
+
getCollectionActiveListingsCurrencies(
|
|
823
|
+
args: GetCollectionActiveListingsCurrenciesArgs,
|
|
824
|
+
headers?: object,
|
|
825
|
+
signal?: AbortSignal
|
|
826
|
+
): Promise<GetCollectionActiveListingsCurrenciesReturn>
|
|
827
|
+
getCollectionActiveOffersCurrencies(
|
|
828
|
+
args: GetCollectionActiveOffersCurrenciesArgs,
|
|
829
|
+
headers?: object,
|
|
830
|
+
signal?: AbortSignal
|
|
831
|
+
): Promise<GetCollectionActiveOffersCurrenciesReturn>
|
|
822
832
|
getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn>
|
|
823
833
|
getLowestPriceOfferForCollectible(
|
|
824
834
|
args: GetLowestPriceOfferForCollectibleArgs,
|
|
@@ -950,7 +960,7 @@ export interface Marketplace {
|
|
|
950
960
|
signal?: AbortSignal
|
|
951
961
|
): Promise<GenerateCancelTransactionReturn>
|
|
952
962
|
/**
|
|
953
|
-
* only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market, use
|
|
963
|
+
* only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market, use only ExecuteInput params and leave other root inputs empty, they are depracated and kept only for backward compatibility
|
|
954
964
|
*/
|
|
955
965
|
execute(args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn>
|
|
956
966
|
/**
|
|
@@ -1034,6 +1044,22 @@ export interface GetCollectionDetailArgs {
|
|
|
1034
1044
|
export interface GetCollectionDetailReturn {
|
|
1035
1045
|
collection: Collection
|
|
1036
1046
|
}
|
|
1047
|
+
export interface GetCollectionActiveListingsCurrenciesArgs {
|
|
1048
|
+
chainId: string
|
|
1049
|
+
contractAddress: string
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
export interface GetCollectionActiveListingsCurrenciesReturn {
|
|
1053
|
+
currencies: Array<Currency>
|
|
1054
|
+
}
|
|
1055
|
+
export interface GetCollectionActiveOffersCurrenciesArgs {
|
|
1056
|
+
chainId: string
|
|
1057
|
+
contractAddress: string
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export interface GetCollectionActiveOffersCurrenciesReturn {
|
|
1061
|
+
currencies: Array<Currency>
|
|
1062
|
+
}
|
|
1037
1063
|
export interface GetCollectibleArgs {
|
|
1038
1064
|
chainId: string
|
|
1039
1065
|
contractAddress: string
|
|
@@ -1312,12 +1338,12 @@ export interface GenerateCancelTransactionReturn {
|
|
|
1312
1338
|
}
|
|
1313
1339
|
export interface ExecuteArgs {
|
|
1314
1340
|
params: ExecuteInput
|
|
1315
|
-
chainId
|
|
1316
|
-
signature
|
|
1317
|
-
method
|
|
1318
|
-
endpoint
|
|
1319
|
-
executeType
|
|
1320
|
-
body
|
|
1341
|
+
chainId?: string
|
|
1342
|
+
signature?: string
|
|
1343
|
+
method?: string
|
|
1344
|
+
endpoint?: string
|
|
1345
|
+
executeType?: ExecuteType
|
|
1346
|
+
body?: any
|
|
1321
1347
|
}
|
|
1322
1348
|
|
|
1323
1349
|
export interface ExecuteReturn {
|
|
@@ -1512,7 +1538,7 @@ export class Admin implements Admin {
|
|
|
1512
1538
|
})
|
|
1513
1539
|
},
|
|
1514
1540
|
error => {
|
|
1515
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1541
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1516
1542
|
}
|
|
1517
1543
|
)
|
|
1518
1544
|
}
|
|
@@ -1527,7 +1553,7 @@ export class Admin implements Admin {
|
|
|
1527
1553
|
})
|
|
1528
1554
|
},
|
|
1529
1555
|
error => {
|
|
1530
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1556
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1531
1557
|
}
|
|
1532
1558
|
)
|
|
1533
1559
|
}
|
|
@@ -1542,7 +1568,7 @@ export class Admin implements Admin {
|
|
|
1542
1568
|
})
|
|
1543
1569
|
},
|
|
1544
1570
|
error => {
|
|
1545
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1571
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1546
1572
|
}
|
|
1547
1573
|
)
|
|
1548
1574
|
}
|
|
@@ -1558,7 +1584,7 @@ export class Admin implements Admin {
|
|
|
1558
1584
|
})
|
|
1559
1585
|
},
|
|
1560
1586
|
error => {
|
|
1561
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1587
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1562
1588
|
}
|
|
1563
1589
|
)
|
|
1564
1590
|
}
|
|
@@ -1573,7 +1599,7 @@ export class Admin implements Admin {
|
|
|
1573
1599
|
})
|
|
1574
1600
|
},
|
|
1575
1601
|
error => {
|
|
1576
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1602
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1577
1603
|
}
|
|
1578
1604
|
)
|
|
1579
1605
|
}
|
|
@@ -1586,7 +1612,7 @@ export class Admin implements Admin {
|
|
|
1586
1612
|
})
|
|
1587
1613
|
},
|
|
1588
1614
|
error => {
|
|
1589
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1615
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1590
1616
|
}
|
|
1591
1617
|
)
|
|
1592
1618
|
}
|
|
@@ -1605,7 +1631,7 @@ export class Admin implements Admin {
|
|
|
1605
1631
|
})
|
|
1606
1632
|
},
|
|
1607
1633
|
error => {
|
|
1608
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1634
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1609
1635
|
}
|
|
1610
1636
|
)
|
|
1611
1637
|
}
|
|
@@ -1622,7 +1648,7 @@ export class Admin implements Admin {
|
|
|
1622
1648
|
})
|
|
1623
1649
|
},
|
|
1624
1650
|
error => {
|
|
1625
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1651
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1626
1652
|
}
|
|
1627
1653
|
)
|
|
1628
1654
|
}
|
|
@@ -1637,7 +1663,7 @@ export class Admin implements Admin {
|
|
|
1637
1663
|
})
|
|
1638
1664
|
},
|
|
1639
1665
|
error => {
|
|
1640
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1666
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1641
1667
|
}
|
|
1642
1668
|
)
|
|
1643
1669
|
}
|
|
@@ -1652,7 +1678,7 @@ export class Admin implements Admin {
|
|
|
1652
1678
|
})
|
|
1653
1679
|
},
|
|
1654
1680
|
error => {
|
|
1655
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1681
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1656
1682
|
}
|
|
1657
1683
|
)
|
|
1658
1684
|
}
|
|
@@ -1667,7 +1693,7 @@ export class Admin implements Admin {
|
|
|
1667
1693
|
})
|
|
1668
1694
|
},
|
|
1669
1695
|
error => {
|
|
1670
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1696
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1671
1697
|
}
|
|
1672
1698
|
)
|
|
1673
1699
|
}
|
|
@@ -1682,7 +1708,7 @@ export class Admin implements Admin {
|
|
|
1682
1708
|
})
|
|
1683
1709
|
},
|
|
1684
1710
|
error => {
|
|
1685
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1711
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1686
1712
|
}
|
|
1687
1713
|
)
|
|
1688
1714
|
}
|
|
@@ -1697,7 +1723,7 @@ export class Admin implements Admin {
|
|
|
1697
1723
|
})
|
|
1698
1724
|
},
|
|
1699
1725
|
error => {
|
|
1700
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1726
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1701
1727
|
}
|
|
1702
1728
|
)
|
|
1703
1729
|
}
|
|
@@ -1710,7 +1736,7 @@ export class Admin implements Admin {
|
|
|
1710
1736
|
})
|
|
1711
1737
|
},
|
|
1712
1738
|
error => {
|
|
1713
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1739
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1714
1740
|
}
|
|
1715
1741
|
)
|
|
1716
1742
|
}
|
|
@@ -1739,7 +1765,7 @@ export class Marketplace implements Marketplace {
|
|
|
1739
1765
|
})
|
|
1740
1766
|
},
|
|
1741
1767
|
error => {
|
|
1742
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1768
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1743
1769
|
}
|
|
1744
1770
|
)
|
|
1745
1771
|
}
|
|
@@ -1758,7 +1784,45 @@ export class Marketplace implements Marketplace {
|
|
|
1758
1784
|
})
|
|
1759
1785
|
},
|
|
1760
1786
|
error => {
|
|
1761
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1787
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1788
|
+
}
|
|
1789
|
+
)
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
getCollectionActiveListingsCurrencies = (
|
|
1793
|
+
args: GetCollectionActiveListingsCurrenciesArgs,
|
|
1794
|
+
headers?: object,
|
|
1795
|
+
signal?: AbortSignal
|
|
1796
|
+
): Promise<GetCollectionActiveListingsCurrenciesReturn> => {
|
|
1797
|
+
return this.fetch(this.url('GetCollectionActiveListingsCurrencies'), createHTTPRequest(args, headers, signal)).then(
|
|
1798
|
+
res => {
|
|
1799
|
+
return buildResponse(res).then(_data => {
|
|
1800
|
+
return {
|
|
1801
|
+
currencies: <Array<Currency>>_data.currencies
|
|
1802
|
+
}
|
|
1803
|
+
})
|
|
1804
|
+
},
|
|
1805
|
+
error => {
|
|
1806
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1807
|
+
}
|
|
1808
|
+
)
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
getCollectionActiveOffersCurrencies = (
|
|
1812
|
+
args: GetCollectionActiveOffersCurrenciesArgs,
|
|
1813
|
+
headers?: object,
|
|
1814
|
+
signal?: AbortSignal
|
|
1815
|
+
): Promise<GetCollectionActiveOffersCurrenciesReturn> => {
|
|
1816
|
+
return this.fetch(this.url('GetCollectionActiveOffersCurrencies'), createHTTPRequest(args, headers, signal)).then(
|
|
1817
|
+
res => {
|
|
1818
|
+
return buildResponse(res).then(_data => {
|
|
1819
|
+
return {
|
|
1820
|
+
currencies: <Array<Currency>>_data.currencies
|
|
1821
|
+
}
|
|
1822
|
+
})
|
|
1823
|
+
},
|
|
1824
|
+
error => {
|
|
1825
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1762
1826
|
}
|
|
1763
1827
|
)
|
|
1764
1828
|
}
|
|
@@ -1773,7 +1837,7 @@ export class Marketplace implements Marketplace {
|
|
|
1773
1837
|
})
|
|
1774
1838
|
},
|
|
1775
1839
|
error => {
|
|
1776
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1840
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1777
1841
|
}
|
|
1778
1842
|
)
|
|
1779
1843
|
}
|
|
@@ -1792,7 +1856,7 @@ export class Marketplace implements Marketplace {
|
|
|
1792
1856
|
})
|
|
1793
1857
|
},
|
|
1794
1858
|
error => {
|
|
1795
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1859
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1796
1860
|
}
|
|
1797
1861
|
)
|
|
1798
1862
|
}
|
|
@@ -1811,7 +1875,7 @@ export class Marketplace implements Marketplace {
|
|
|
1811
1875
|
})
|
|
1812
1876
|
},
|
|
1813
1877
|
error => {
|
|
1814
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1878
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1815
1879
|
}
|
|
1816
1880
|
)
|
|
1817
1881
|
}
|
|
@@ -1830,7 +1894,7 @@ export class Marketplace implements Marketplace {
|
|
|
1830
1894
|
})
|
|
1831
1895
|
},
|
|
1832
1896
|
error => {
|
|
1833
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1897
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1834
1898
|
}
|
|
1835
1899
|
)
|
|
1836
1900
|
}
|
|
@@ -1849,7 +1913,7 @@ export class Marketplace implements Marketplace {
|
|
|
1849
1913
|
})
|
|
1850
1914
|
},
|
|
1851
1915
|
error => {
|
|
1852
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1916
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1853
1917
|
}
|
|
1854
1918
|
)
|
|
1855
1919
|
}
|
|
@@ -1869,7 +1933,7 @@ export class Marketplace implements Marketplace {
|
|
|
1869
1933
|
})
|
|
1870
1934
|
},
|
|
1871
1935
|
error => {
|
|
1872
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1936
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1873
1937
|
}
|
|
1874
1938
|
)
|
|
1875
1939
|
}
|
|
@@ -1889,7 +1953,7 @@ export class Marketplace implements Marketplace {
|
|
|
1889
1953
|
})
|
|
1890
1954
|
},
|
|
1891
1955
|
error => {
|
|
1892
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1956
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1893
1957
|
}
|
|
1894
1958
|
)
|
|
1895
1959
|
}
|
|
@@ -1909,7 +1973,7 @@ export class Marketplace implements Marketplace {
|
|
|
1909
1973
|
})
|
|
1910
1974
|
},
|
|
1911
1975
|
error => {
|
|
1912
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1976
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1913
1977
|
}
|
|
1914
1978
|
)
|
|
1915
1979
|
}
|
|
@@ -1928,7 +1992,7 @@ export class Marketplace implements Marketplace {
|
|
|
1928
1992
|
})
|
|
1929
1993
|
},
|
|
1930
1994
|
error => {
|
|
1931
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
1995
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1932
1996
|
}
|
|
1933
1997
|
)
|
|
1934
1998
|
}
|
|
@@ -1947,7 +2011,7 @@ export class Marketplace implements Marketplace {
|
|
|
1947
2011
|
})
|
|
1948
2012
|
},
|
|
1949
2013
|
error => {
|
|
1950
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2014
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1951
2015
|
}
|
|
1952
2016
|
)
|
|
1953
2017
|
}
|
|
@@ -1963,7 +2027,7 @@ export class Marketplace implements Marketplace {
|
|
|
1963
2027
|
})
|
|
1964
2028
|
},
|
|
1965
2029
|
error => {
|
|
1966
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2030
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1967
2031
|
}
|
|
1968
2032
|
)
|
|
1969
2033
|
}
|
|
@@ -1979,7 +2043,7 @@ export class Marketplace implements Marketplace {
|
|
|
1979
2043
|
})
|
|
1980
2044
|
},
|
|
1981
2045
|
error => {
|
|
1982
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2046
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1983
2047
|
}
|
|
1984
2048
|
)
|
|
1985
2049
|
}
|
|
@@ -1998,7 +2062,7 @@ export class Marketplace implements Marketplace {
|
|
|
1998
2062
|
})
|
|
1999
2063
|
},
|
|
2000
2064
|
error => {
|
|
2001
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2065
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2002
2066
|
}
|
|
2003
2067
|
)
|
|
2004
2068
|
}
|
|
@@ -2017,7 +2081,7 @@ export class Marketplace implements Marketplace {
|
|
|
2017
2081
|
})
|
|
2018
2082
|
},
|
|
2019
2083
|
error => {
|
|
2020
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2084
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2021
2085
|
}
|
|
2022
2086
|
)
|
|
2023
2087
|
}
|
|
@@ -2036,7 +2100,7 @@ export class Marketplace implements Marketplace {
|
|
|
2036
2100
|
})
|
|
2037
2101
|
},
|
|
2038
2102
|
error => {
|
|
2039
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2103
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2040
2104
|
}
|
|
2041
2105
|
)
|
|
2042
2106
|
}
|
|
@@ -2055,7 +2119,7 @@ export class Marketplace implements Marketplace {
|
|
|
2055
2119
|
})
|
|
2056
2120
|
},
|
|
2057
2121
|
error => {
|
|
2058
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2122
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2059
2123
|
}
|
|
2060
2124
|
)
|
|
2061
2125
|
}
|
|
@@ -2074,7 +2138,7 @@ export class Marketplace implements Marketplace {
|
|
|
2074
2138
|
})
|
|
2075
2139
|
},
|
|
2076
2140
|
error => {
|
|
2077
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2141
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2078
2142
|
}
|
|
2079
2143
|
)
|
|
2080
2144
|
}
|
|
@@ -2093,7 +2157,7 @@ export class Marketplace implements Marketplace {
|
|
|
2093
2157
|
})
|
|
2094
2158
|
},
|
|
2095
2159
|
error => {
|
|
2096
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2160
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2097
2161
|
}
|
|
2098
2162
|
)
|
|
2099
2163
|
}
|
|
@@ -2113,7 +2177,7 @@ export class Marketplace implements Marketplace {
|
|
|
2113
2177
|
})
|
|
2114
2178
|
},
|
|
2115
2179
|
error => {
|
|
2116
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2180
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2117
2181
|
}
|
|
2118
2182
|
)
|
|
2119
2183
|
}
|
|
@@ -2133,7 +2197,7 @@ export class Marketplace implements Marketplace {
|
|
|
2133
2197
|
})
|
|
2134
2198
|
},
|
|
2135
2199
|
error => {
|
|
2136
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2200
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2137
2201
|
}
|
|
2138
2202
|
)
|
|
2139
2203
|
}
|
|
@@ -2152,7 +2216,7 @@ export class Marketplace implements Marketplace {
|
|
|
2152
2216
|
})
|
|
2153
2217
|
},
|
|
2154
2218
|
error => {
|
|
2155
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2219
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2156
2220
|
}
|
|
2157
2221
|
)
|
|
2158
2222
|
}
|
|
@@ -2171,7 +2235,7 @@ export class Marketplace implements Marketplace {
|
|
|
2171
2235
|
})
|
|
2172
2236
|
},
|
|
2173
2237
|
error => {
|
|
2174
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2238
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2175
2239
|
}
|
|
2176
2240
|
)
|
|
2177
2241
|
}
|
|
@@ -2190,7 +2254,7 @@ export class Marketplace implements Marketplace {
|
|
|
2190
2254
|
})
|
|
2191
2255
|
},
|
|
2192
2256
|
error => {
|
|
2193
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2257
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2194
2258
|
}
|
|
2195
2259
|
)
|
|
2196
2260
|
}
|
|
@@ -2209,7 +2273,7 @@ export class Marketplace implements Marketplace {
|
|
|
2209
2273
|
})
|
|
2210
2274
|
},
|
|
2211
2275
|
error => {
|
|
2212
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2276
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2213
2277
|
}
|
|
2214
2278
|
)
|
|
2215
2279
|
}
|
|
@@ -2228,7 +2292,7 @@ export class Marketplace implements Marketplace {
|
|
|
2228
2292
|
})
|
|
2229
2293
|
},
|
|
2230
2294
|
error => {
|
|
2231
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2295
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2232
2296
|
}
|
|
2233
2297
|
)
|
|
2234
2298
|
}
|
|
@@ -2243,7 +2307,7 @@ export class Marketplace implements Marketplace {
|
|
|
2243
2307
|
})
|
|
2244
2308
|
},
|
|
2245
2309
|
error => {
|
|
2246
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2310
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2247
2311
|
}
|
|
2248
2312
|
)
|
|
2249
2313
|
}
|
|
@@ -2259,7 +2323,7 @@ export class Marketplace implements Marketplace {
|
|
|
2259
2323
|
})
|
|
2260
2324
|
},
|
|
2261
2325
|
error => {
|
|
2262
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2326
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2263
2327
|
}
|
|
2264
2328
|
)
|
|
2265
2329
|
}
|
|
@@ -2278,7 +2342,7 @@ export class Marketplace implements Marketplace {
|
|
|
2278
2342
|
})
|
|
2279
2343
|
},
|
|
2280
2344
|
error => {
|
|
2281
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2345
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2282
2346
|
}
|
|
2283
2347
|
)
|
|
2284
2348
|
}
|
|
@@ -2297,7 +2361,7 @@ export class Marketplace implements Marketplace {
|
|
|
2297
2361
|
})
|
|
2298
2362
|
},
|
|
2299
2363
|
error => {
|
|
2300
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2364
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2301
2365
|
}
|
|
2302
2366
|
)
|
|
2303
2367
|
}
|
|
@@ -2312,7 +2376,7 @@ export class Marketplace implements Marketplace {
|
|
|
2312
2376
|
})
|
|
2313
2377
|
},
|
|
2314
2378
|
error => {
|
|
2315
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2379
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2316
2380
|
}
|
|
2317
2381
|
)
|
|
2318
2382
|
}
|
|
@@ -2332,7 +2396,7 @@ export class Marketplace implements Marketplace {
|
|
|
2332
2396
|
})
|
|
2333
2397
|
},
|
|
2334
2398
|
error => {
|
|
2335
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2399
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2336
2400
|
}
|
|
2337
2401
|
)
|
|
2338
2402
|
}
|
|
@@ -2352,7 +2416,7 @@ export class Marketplace implements Marketplace {
|
|
|
2352
2416
|
})
|
|
2353
2417
|
},
|
|
2354
2418
|
error => {
|
|
2355
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2419
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2356
2420
|
}
|
|
2357
2421
|
)
|
|
2358
2422
|
}
|
|
@@ -2372,7 +2436,7 @@ export class Marketplace implements Marketplace {
|
|
|
2372
2436
|
})
|
|
2373
2437
|
},
|
|
2374
2438
|
error => {
|
|
2375
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2439
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2376
2440
|
}
|
|
2377
2441
|
)
|
|
2378
2442
|
}
|
|
@@ -2392,7 +2456,7 @@ export class Marketplace implements Marketplace {
|
|
|
2392
2456
|
})
|
|
2393
2457
|
},
|
|
2394
2458
|
error => {
|
|
2395
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2459
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2396
2460
|
}
|
|
2397
2461
|
)
|
|
2398
2462
|
}
|
|
@@ -2405,7 +2469,7 @@ export class Marketplace implements Marketplace {
|
|
|
2405
2469
|
})
|
|
2406
2470
|
},
|
|
2407
2471
|
error => {
|
|
2408
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2472
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2409
2473
|
}
|
|
2410
2474
|
)
|
|
2411
2475
|
}
|
|
@@ -2418,7 +2482,7 @@ export class Marketplace implements Marketplace {
|
|
|
2418
2482
|
})
|
|
2419
2483
|
},
|
|
2420
2484
|
error => {
|
|
2421
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2485
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2422
2486
|
}
|
|
2423
2487
|
)
|
|
2424
2488
|
}
|
|
@@ -2434,7 +2498,7 @@ export class Marketplace implements Marketplace {
|
|
|
2434
2498
|
})
|
|
2435
2499
|
},
|
|
2436
2500
|
error => {
|
|
2437
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2501
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2438
2502
|
}
|
|
2439
2503
|
)
|
|
2440
2504
|
}
|
|
@@ -2453,7 +2517,7 @@ export class Marketplace implements Marketplace {
|
|
|
2453
2517
|
})
|
|
2454
2518
|
},
|
|
2455
2519
|
error => {
|
|
2456
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2520
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2457
2521
|
}
|
|
2458
2522
|
)
|
|
2459
2523
|
}
|
|
@@ -2472,7 +2536,7 @@ export class Marketplace implements Marketplace {
|
|
|
2472
2536
|
})
|
|
2473
2537
|
},
|
|
2474
2538
|
error => {
|
|
2475
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2539
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2476
2540
|
}
|
|
2477
2541
|
)
|
|
2478
2542
|
}
|
|
@@ -2491,7 +2555,7 @@ export class Marketplace implements Marketplace {
|
|
|
2491
2555
|
})
|
|
2492
2556
|
},
|
|
2493
2557
|
error => {
|
|
2494
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2558
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2495
2559
|
}
|
|
2496
2560
|
)
|
|
2497
2561
|
}
|
|
@@ -2510,7 +2574,7 @@ export class Marketplace implements Marketplace {
|
|
|
2510
2574
|
})
|
|
2511
2575
|
},
|
|
2512
2576
|
error => {
|
|
2513
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2577
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2514
2578
|
}
|
|
2515
2579
|
)
|
|
2516
2580
|
}
|
|
@@ -2530,7 +2594,7 @@ export class Marketplace implements Marketplace {
|
|
|
2530
2594
|
})
|
|
2531
2595
|
},
|
|
2532
2596
|
error => {
|
|
2533
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2597
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2534
2598
|
}
|
|
2535
2599
|
)
|
|
2536
2600
|
}
|
|
@@ -2549,7 +2613,7 @@ export class Marketplace implements Marketplace {
|
|
|
2549
2613
|
})
|
|
2550
2614
|
},
|
|
2551
2615
|
error => {
|
|
2552
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message
|
|
2616
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2553
2617
|
}
|
|
2554
2618
|
)
|
|
2555
2619
|
}
|
|
@@ -2573,13 +2637,9 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
2573
2637
|
try {
|
|
2574
2638
|
data = JSON.parse(text)
|
|
2575
2639
|
} catch (error) {
|
|
2576
|
-
let message = ''
|
|
2577
|
-
if (error instanceof Error) {
|
|
2578
|
-
message = error.message
|
|
2579
|
-
}
|
|
2580
2640
|
throw WebrpcBadResponseError.new({
|
|
2581
2641
|
status: res.status,
|
|
2582
|
-
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
2642
|
+
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
|
|
2583
2643
|
})
|
|
2584
2644
|
}
|
|
2585
2645
|
if (!res.ok) {
|
|
@@ -2627,7 +2687,7 @@ export class WebrpcEndpointError extends WebrpcError {
|
|
|
2627
2687
|
name: string = 'WebrpcEndpoint',
|
|
2628
2688
|
code: number = 0,
|
|
2629
2689
|
message: string = `endpoint error`,
|
|
2630
|
-
status: number =
|
|
2690
|
+
status: number = 400,
|
|
2631
2691
|
cause?: string
|
|
2632
2692
|
) {
|
|
2633
2693
|
super(name, code, message, status, cause)
|
|
@@ -2640,7 +2700,7 @@ export class WebrpcRequestFailedError extends WebrpcError {
|
|
|
2640
2700
|
name: string = 'WebrpcRequestFailed',
|
|
2641
2701
|
code: number = -1,
|
|
2642
2702
|
message: string = `request failed`,
|
|
2643
|
-
status: number =
|
|
2703
|
+
status: number = 400,
|
|
2644
2704
|
cause?: string
|
|
2645
2705
|
) {
|
|
2646
2706
|
super(name, code, message, status, cause)
|
|
@@ -2653,7 +2713,7 @@ export class WebrpcBadRouteError extends WebrpcError {
|
|
|
2653
2713
|
name: string = 'WebrpcBadRoute',
|
|
2654
2714
|
code: number = -2,
|
|
2655
2715
|
message: string = `bad route`,
|
|
2656
|
-
status: number =
|
|
2716
|
+
status: number = 404,
|
|
2657
2717
|
cause?: string
|
|
2658
2718
|
) {
|
|
2659
2719
|
super(name, code, message, status, cause)
|
|
@@ -2666,7 +2726,7 @@ export class WebrpcBadMethodError extends WebrpcError {
|
|
|
2666
2726
|
name: string = 'WebrpcBadMethod',
|
|
2667
2727
|
code: number = -3,
|
|
2668
2728
|
message: string = `bad method`,
|
|
2669
|
-
status: number =
|
|
2729
|
+
status: number = 405,
|
|
2670
2730
|
cause?: string
|
|
2671
2731
|
) {
|
|
2672
2732
|
super(name, code, message, status, cause)
|
|
@@ -2679,7 +2739,7 @@ export class WebrpcBadRequestError extends WebrpcError {
|
|
|
2679
2739
|
name: string = 'WebrpcBadRequest',
|
|
2680
2740
|
code: number = -4,
|
|
2681
2741
|
message: string = `bad request`,
|
|
2682
|
-
status: number =
|
|
2742
|
+
status: number = 400,
|
|
2683
2743
|
cause?: string
|
|
2684
2744
|
) {
|
|
2685
2745
|
super(name, code, message, status, cause)
|
|
@@ -2692,7 +2752,7 @@ export class WebrpcBadResponseError extends WebrpcError {
|
|
|
2692
2752
|
name: string = 'WebrpcBadResponse',
|
|
2693
2753
|
code: number = -5,
|
|
2694
2754
|
message: string = `bad response`,
|
|
2695
|
-
status: number =
|
|
2755
|
+
status: number = 500,
|
|
2696
2756
|
cause?: string
|
|
2697
2757
|
) {
|
|
2698
2758
|
super(name, code, message, status, cause)
|
|
@@ -2705,7 +2765,7 @@ export class WebrpcServerPanicError extends WebrpcError {
|
|
|
2705
2765
|
name: string = 'WebrpcServerPanic',
|
|
2706
2766
|
code: number = -6,
|
|
2707
2767
|
message: string = `server panic`,
|
|
2708
|
-
status: number =
|
|
2768
|
+
status: number = 500,
|
|
2709
2769
|
cause?: string
|
|
2710
2770
|
) {
|
|
2711
2771
|
super(name, code, message, status, cause)
|
|
@@ -2718,7 +2778,7 @@ export class WebrpcInternalErrorError extends WebrpcError {
|
|
|
2718
2778
|
name: string = 'WebrpcInternalError',
|
|
2719
2779
|
code: number = -7,
|
|
2720
2780
|
message: string = `internal error`,
|
|
2721
|
-
status: number =
|
|
2781
|
+
status: number = 500,
|
|
2722
2782
|
cause?: string
|
|
2723
2783
|
) {
|
|
2724
2784
|
super(name, code, message, status, cause)
|
|
@@ -2726,16 +2786,16 @@ export class WebrpcInternalErrorError extends WebrpcError {
|
|
|
2726
2786
|
}
|
|
2727
2787
|
}
|
|
2728
2788
|
|
|
2729
|
-
export class
|
|
2789
|
+
export class WebrpcClientAbortedError extends WebrpcError {
|
|
2730
2790
|
constructor(
|
|
2731
|
-
name: string = '
|
|
2791
|
+
name: string = 'WebrpcClientAborted',
|
|
2732
2792
|
code: number = -8,
|
|
2733
|
-
message: string = `client
|
|
2734
|
-
status: number =
|
|
2793
|
+
message: string = `request aborted by client`,
|
|
2794
|
+
status: number = 400,
|
|
2735
2795
|
cause?: string
|
|
2736
2796
|
) {
|
|
2737
2797
|
super(name, code, message, status, cause)
|
|
2738
|
-
Object.setPrototypeOf(this,
|
|
2798
|
+
Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype)
|
|
2739
2799
|
}
|
|
2740
2800
|
}
|
|
2741
2801
|
|
|
@@ -2744,7 +2804,7 @@ export class WebrpcStreamLostError extends WebrpcError {
|
|
|
2744
2804
|
name: string = 'WebrpcStreamLost',
|
|
2745
2805
|
code: number = -9,
|
|
2746
2806
|
message: string = `stream lost`,
|
|
2747
|
-
status: number =
|
|
2807
|
+
status: number = 400,
|
|
2748
2808
|
cause?: string
|
|
2749
2809
|
) {
|
|
2750
2810
|
super(name, code, message, status, cause)
|
|
@@ -2757,7 +2817,7 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
2757
2817
|
name: string = 'WebrpcStreamFinished',
|
|
2758
2818
|
code: number = -10,
|
|
2759
2819
|
message: string = `stream finished`,
|
|
2760
|
-
status: number =
|
|
2820
|
+
status: number = 200,
|
|
2761
2821
|
cause?: string
|
|
2762
2822
|
) {
|
|
2763
2823
|
super(name, code, message, status, cause)
|
|
@@ -2772,7 +2832,7 @@ export class UnauthorizedError extends WebrpcError {
|
|
|
2772
2832
|
name: string = 'Unauthorized',
|
|
2773
2833
|
code: number = 1000,
|
|
2774
2834
|
message: string = `Unauthorized access`,
|
|
2775
|
-
status: number =
|
|
2835
|
+
status: number = 401,
|
|
2776
2836
|
cause?: string
|
|
2777
2837
|
) {
|
|
2778
2838
|
super(name, code, message, status, cause)
|
|
@@ -2785,7 +2845,7 @@ export class PermissionDeniedError extends WebrpcError {
|
|
|
2785
2845
|
name: string = 'PermissionDenied',
|
|
2786
2846
|
code: number = 1001,
|
|
2787
2847
|
message: string = `Permission denied`,
|
|
2788
|
-
status: number =
|
|
2848
|
+
status: number = 403,
|
|
2789
2849
|
cause?: string
|
|
2790
2850
|
) {
|
|
2791
2851
|
super(name, code, message, status, cause)
|
|
@@ -2798,7 +2858,7 @@ export class SessionExpiredError extends WebrpcError {
|
|
|
2798
2858
|
name: string = 'SessionExpired',
|
|
2799
2859
|
code: number = 1002,
|
|
2800
2860
|
message: string = `Session expired`,
|
|
2801
|
-
status: number =
|
|
2861
|
+
status: number = 403,
|
|
2802
2862
|
cause?: string
|
|
2803
2863
|
) {
|
|
2804
2864
|
super(name, code, message, status, cause)
|
|
@@ -2811,7 +2871,7 @@ export class MethodNotFoundError extends WebrpcError {
|
|
|
2811
2871
|
name: string = 'MethodNotFound',
|
|
2812
2872
|
code: number = 1003,
|
|
2813
2873
|
message: string = `Method not found`,
|
|
2814
|
-
status: number =
|
|
2874
|
+
status: number = 404,
|
|
2815
2875
|
cause?: string
|
|
2816
2876
|
) {
|
|
2817
2877
|
super(name, code, message, status, cause)
|
|
@@ -2819,64 +2879,64 @@ export class MethodNotFoundError extends WebrpcError {
|
|
|
2819
2879
|
}
|
|
2820
2880
|
}
|
|
2821
2881
|
|
|
2822
|
-
export class
|
|
2882
|
+
export class RequestConflictError extends WebrpcError {
|
|
2823
2883
|
constructor(
|
|
2824
|
-
name: string = '
|
|
2825
|
-
code: number =
|
|
2826
|
-
message: string = `
|
|
2827
|
-
status: number =
|
|
2884
|
+
name: string = 'RequestConflict',
|
|
2885
|
+
code: number = 1004,
|
|
2886
|
+
message: string = `Conflict with target resource`,
|
|
2887
|
+
status: number = 409,
|
|
2828
2888
|
cause?: string
|
|
2829
2889
|
) {
|
|
2830
2890
|
super(name, code, message, status, cause)
|
|
2831
|
-
Object.setPrototypeOf(this,
|
|
2891
|
+
Object.setPrototypeOf(this, RequestConflictError.prototype)
|
|
2832
2892
|
}
|
|
2833
2893
|
}
|
|
2834
2894
|
|
|
2835
|
-
export class
|
|
2895
|
+
export class AbortedError extends WebrpcError {
|
|
2836
2896
|
constructor(
|
|
2837
|
-
name: string = '
|
|
2838
|
-
code: number =
|
|
2839
|
-
message: string = `
|
|
2840
|
-
status: number =
|
|
2897
|
+
name: string = 'Aborted',
|
|
2898
|
+
code: number = 1005,
|
|
2899
|
+
message: string = `Request aborted`,
|
|
2900
|
+
status: number = 400,
|
|
2841
2901
|
cause?: string
|
|
2842
2902
|
) {
|
|
2843
2903
|
super(name, code, message, status, cause)
|
|
2844
|
-
Object.setPrototypeOf(this,
|
|
2904
|
+
Object.setPrototypeOf(this, AbortedError.prototype)
|
|
2845
2905
|
}
|
|
2846
2906
|
}
|
|
2847
2907
|
|
|
2848
|
-
export class
|
|
2908
|
+
export class GeoblockedError extends WebrpcError {
|
|
2849
2909
|
constructor(
|
|
2850
|
-
name: string = '
|
|
2851
|
-
code: number =
|
|
2852
|
-
message: string = `
|
|
2853
|
-
status: number =
|
|
2910
|
+
name: string = 'Geoblocked',
|
|
2911
|
+
code: number = 1006,
|
|
2912
|
+
message: string = `Geoblocked region`,
|
|
2913
|
+
status: number = 451,
|
|
2854
2914
|
cause?: string
|
|
2855
2915
|
) {
|
|
2856
2916
|
super(name, code, message, status, cause)
|
|
2857
|
-
Object.setPrototypeOf(this,
|
|
2917
|
+
Object.setPrototypeOf(this, GeoblockedError.prototype)
|
|
2858
2918
|
}
|
|
2859
2919
|
}
|
|
2860
2920
|
|
|
2861
|
-
export class
|
|
2921
|
+
export class RateLimitedError extends WebrpcError {
|
|
2862
2922
|
constructor(
|
|
2863
|
-
name: string = '
|
|
2864
|
-
code: number =
|
|
2865
|
-
message: string = `
|
|
2866
|
-
status: number =
|
|
2923
|
+
name: string = 'RateLimited',
|
|
2924
|
+
code: number = 1007,
|
|
2925
|
+
message: string = `Rate-limited. Please slow down.`,
|
|
2926
|
+
status: number = 429,
|
|
2867
2927
|
cause?: string
|
|
2868
2928
|
) {
|
|
2869
2929
|
super(name, code, message, status, cause)
|
|
2870
|
-
Object.setPrototypeOf(this,
|
|
2930
|
+
Object.setPrototypeOf(this, RateLimitedError.prototype)
|
|
2871
2931
|
}
|
|
2872
2932
|
}
|
|
2873
2933
|
|
|
2874
2934
|
export class ProjectNotFoundError extends WebrpcError {
|
|
2875
2935
|
constructor(
|
|
2876
2936
|
name: string = 'ProjectNotFound',
|
|
2877
|
-
code: number =
|
|
2937
|
+
code: number = 1008,
|
|
2878
2938
|
message: string = `Project not found`,
|
|
2879
|
-
status: number =
|
|
2939
|
+
status: number = 401,
|
|
2880
2940
|
cause?: string
|
|
2881
2941
|
) {
|
|
2882
2942
|
super(name, code, message, status, cause)
|
|
@@ -2884,29 +2944,198 @@ export class ProjectNotFoundError extends WebrpcError {
|
|
|
2884
2944
|
}
|
|
2885
2945
|
}
|
|
2886
2946
|
|
|
2887
|
-
export class
|
|
2947
|
+
export class SecretKeyCorsDisallowedError extends WebrpcError {
|
|
2948
|
+
constructor(
|
|
2949
|
+
name: string = 'SecretKeyCorsDisallowed',
|
|
2950
|
+
code: number = 1009,
|
|
2951
|
+
message: string = `CORS disallowed. Admin API Secret Key can't be used from a web app.`,
|
|
2952
|
+
status: number = 403,
|
|
2953
|
+
cause?: string
|
|
2954
|
+
) {
|
|
2955
|
+
super(name, code, message, status, cause)
|
|
2956
|
+
Object.setPrototypeOf(this, SecretKeyCorsDisallowedError.prototype)
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
export class AccessKeyNotFoundError extends WebrpcError {
|
|
2961
|
+
constructor(
|
|
2962
|
+
name: string = 'AccessKeyNotFound',
|
|
2963
|
+
code: number = 1101,
|
|
2964
|
+
message: string = `Access key not found`,
|
|
2965
|
+
status: number = 401,
|
|
2966
|
+
cause?: string
|
|
2967
|
+
) {
|
|
2968
|
+
super(name, code, message, status, cause)
|
|
2969
|
+
Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype)
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
export class AccessKeyMismatchError extends WebrpcError {
|
|
2888
2974
|
constructor(
|
|
2889
|
-
name: string = '
|
|
2890
|
-
code: number =
|
|
2891
|
-
message: string = `
|
|
2892
|
-
status: number =
|
|
2975
|
+
name: string = 'AccessKeyMismatch',
|
|
2976
|
+
code: number = 1102,
|
|
2977
|
+
message: string = `Access key mismatch`,
|
|
2978
|
+
status: number = 403,
|
|
2893
2979
|
cause?: string
|
|
2894
2980
|
) {
|
|
2895
2981
|
super(name, code, message, status, cause)
|
|
2896
|
-
Object.setPrototypeOf(this,
|
|
2982
|
+
Object.setPrototypeOf(this, AccessKeyMismatchError.prototype)
|
|
2897
2983
|
}
|
|
2898
2984
|
}
|
|
2899
2985
|
|
|
2900
|
-
export class
|
|
2986
|
+
export class InvalidOriginError extends WebrpcError {
|
|
2901
2987
|
constructor(
|
|
2902
|
-
name: string = '
|
|
2903
|
-
code: number =
|
|
2904
|
-
message: string = `
|
|
2905
|
-
status: number =
|
|
2988
|
+
name: string = 'InvalidOrigin',
|
|
2989
|
+
code: number = 1103,
|
|
2990
|
+
message: string = `Invalid origin for Access Key`,
|
|
2991
|
+
status: number = 403,
|
|
2906
2992
|
cause?: string
|
|
2907
2993
|
) {
|
|
2908
2994
|
super(name, code, message, status, cause)
|
|
2909
|
-
Object.setPrototypeOf(this,
|
|
2995
|
+
Object.setPrototypeOf(this, InvalidOriginError.prototype)
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
export class InvalidServiceError extends WebrpcError {
|
|
3000
|
+
constructor(
|
|
3001
|
+
name: string = 'InvalidService',
|
|
3002
|
+
code: number = 1104,
|
|
3003
|
+
message: string = `Service not enabled for Access key`,
|
|
3004
|
+
status: number = 403,
|
|
3005
|
+
cause?: string
|
|
3006
|
+
) {
|
|
3007
|
+
super(name, code, message, status, cause)
|
|
3008
|
+
Object.setPrototypeOf(this, InvalidServiceError.prototype)
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
export class UnauthorizedUserError extends WebrpcError {
|
|
3013
|
+
constructor(
|
|
3014
|
+
name: string = 'UnauthorizedUser',
|
|
3015
|
+
code: number = 1105,
|
|
3016
|
+
message: string = `Unauthorized user`,
|
|
3017
|
+
status: number = 403,
|
|
3018
|
+
cause?: string
|
|
3019
|
+
) {
|
|
3020
|
+
super(name, code, message, status, cause)
|
|
3021
|
+
Object.setPrototypeOf(this, UnauthorizedUserError.prototype)
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
export class InvalidChainError extends WebrpcError {
|
|
3026
|
+
constructor(
|
|
3027
|
+
name: string = 'InvalidChain',
|
|
3028
|
+
code: number = 1106,
|
|
3029
|
+
message: string = `Network not enabled for Access key`,
|
|
3030
|
+
status: number = 403,
|
|
3031
|
+
cause?: string
|
|
3032
|
+
) {
|
|
3033
|
+
super(name, code, message, status, cause)
|
|
3034
|
+
Object.setPrototypeOf(this, InvalidChainError.prototype)
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
export class QuotaExceededError extends WebrpcError {
|
|
3039
|
+
constructor(
|
|
3040
|
+
name: string = 'QuotaExceeded',
|
|
3041
|
+
code: number = 1200,
|
|
3042
|
+
message: string = `Quota request exceeded`,
|
|
3043
|
+
status: number = 429,
|
|
3044
|
+
cause?: string
|
|
3045
|
+
) {
|
|
3046
|
+
super(name, code, message, status, cause)
|
|
3047
|
+
Object.setPrototypeOf(this, QuotaExceededError.prototype)
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
export class QuotaRateLimitError extends WebrpcError {
|
|
3052
|
+
constructor(
|
|
3053
|
+
name: string = 'QuotaRateLimit',
|
|
3054
|
+
code: number = 1201,
|
|
3055
|
+
message: string = `Quota rate limit exceeded`,
|
|
3056
|
+
status: number = 429,
|
|
3057
|
+
cause?: string
|
|
3058
|
+
) {
|
|
3059
|
+
super(name, code, message, status, cause)
|
|
3060
|
+
Object.setPrototypeOf(this, QuotaRateLimitError.prototype)
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
export class NoDefaultKeyError extends WebrpcError {
|
|
3065
|
+
constructor(
|
|
3066
|
+
name: string = 'NoDefaultKey',
|
|
3067
|
+
code: number = 1300,
|
|
3068
|
+
message: string = `No default access key found`,
|
|
3069
|
+
status: number = 403,
|
|
3070
|
+
cause?: string
|
|
3071
|
+
) {
|
|
3072
|
+
super(name, code, message, status, cause)
|
|
3073
|
+
Object.setPrototypeOf(this, NoDefaultKeyError.prototype)
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
export class MaxAccessKeysError extends WebrpcError {
|
|
3078
|
+
constructor(
|
|
3079
|
+
name: string = 'MaxAccessKeys',
|
|
3080
|
+
code: number = 1301,
|
|
3081
|
+
message: string = `Access keys limit reached`,
|
|
3082
|
+
status: number = 403,
|
|
3083
|
+
cause?: string
|
|
3084
|
+
) {
|
|
3085
|
+
super(name, code, message, status, cause)
|
|
3086
|
+
Object.setPrototypeOf(this, MaxAccessKeysError.prototype)
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3090
|
+
export class AtLeastOneKeyError extends WebrpcError {
|
|
3091
|
+
constructor(
|
|
3092
|
+
name: string = 'AtLeastOneKey',
|
|
3093
|
+
code: number = 1302,
|
|
3094
|
+
message: string = `You need at least one Access Key`,
|
|
3095
|
+
status: number = 403,
|
|
3096
|
+
cause?: string
|
|
3097
|
+
) {
|
|
3098
|
+
super(name, code, message, status, cause)
|
|
3099
|
+
Object.setPrototypeOf(this, AtLeastOneKeyError.prototype)
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
export class TimeoutError extends WebrpcError {
|
|
3104
|
+
constructor(
|
|
3105
|
+
name: string = 'Timeout',
|
|
3106
|
+
code: number = 1900,
|
|
3107
|
+
message: string = `Request timed out`,
|
|
3108
|
+
status: number = 408,
|
|
3109
|
+
cause?: string
|
|
3110
|
+
) {
|
|
3111
|
+
super(name, code, message, status, cause)
|
|
3112
|
+
Object.setPrototypeOf(this, TimeoutError.prototype)
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
export class NotFoundError extends WebrpcError {
|
|
3117
|
+
constructor(
|
|
3118
|
+
name: string = 'NotFound',
|
|
3119
|
+
code: number = 2000,
|
|
3120
|
+
message: string = `Resource not found`,
|
|
3121
|
+
status: number = 400,
|
|
3122
|
+
cause?: string
|
|
3123
|
+
) {
|
|
3124
|
+
super(name, code, message, status, cause)
|
|
3125
|
+
Object.setPrototypeOf(this, NotFoundError.prototype)
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
export class InvalidArgumentError extends WebrpcError {
|
|
3130
|
+
constructor(
|
|
3131
|
+
name: string = 'InvalidArgument',
|
|
3132
|
+
code: number = 2001,
|
|
3133
|
+
message: string = `Invalid argument`,
|
|
3134
|
+
status: number = 400,
|
|
3135
|
+
cause?: string
|
|
3136
|
+
) {
|
|
3137
|
+
super(name, code, message, status, cause)
|
|
3138
|
+
Object.setPrototypeOf(this, InvalidArgumentError.prototype)
|
|
2910
3139
|
}
|
|
2911
3140
|
}
|
|
2912
3141
|
|
|
@@ -2915,7 +3144,7 @@ export class NotImplementedError extends WebrpcError {
|
|
|
2915
3144
|
name: string = 'NotImplemented',
|
|
2916
3145
|
code: number = 9999,
|
|
2917
3146
|
message: string = `Not Implemented`,
|
|
2918
|
-
status: number =
|
|
3147
|
+
status: number = 500,
|
|
2919
3148
|
cause?: string
|
|
2920
3149
|
) {
|
|
2921
3150
|
super(name, code, message, status, cause)
|
|
@@ -2932,20 +3161,33 @@ export enum errors {
|
|
|
2932
3161
|
WebrpcBadResponse = 'WebrpcBadResponse',
|
|
2933
3162
|
WebrpcServerPanic = 'WebrpcServerPanic',
|
|
2934
3163
|
WebrpcInternalError = 'WebrpcInternalError',
|
|
2935
|
-
|
|
3164
|
+
WebrpcClientAborted = 'WebrpcClientAborted',
|
|
2936
3165
|
WebrpcStreamLost = 'WebrpcStreamLost',
|
|
2937
3166
|
WebrpcStreamFinished = 'WebrpcStreamFinished',
|
|
2938
3167
|
Unauthorized = 'Unauthorized',
|
|
2939
3168
|
PermissionDenied = 'PermissionDenied',
|
|
2940
3169
|
SessionExpired = 'SessionExpired',
|
|
2941
3170
|
MethodNotFound = 'MethodNotFound',
|
|
3171
|
+
RequestConflict = 'RequestConflict',
|
|
3172
|
+
Aborted = 'Aborted',
|
|
3173
|
+
Geoblocked = 'Geoblocked',
|
|
3174
|
+
RateLimited = 'RateLimited',
|
|
3175
|
+
ProjectNotFound = 'ProjectNotFound',
|
|
3176
|
+
SecretKeyCorsDisallowed = 'SecretKeyCorsDisallowed',
|
|
3177
|
+
AccessKeyNotFound = 'AccessKeyNotFound',
|
|
3178
|
+
AccessKeyMismatch = 'AccessKeyMismatch',
|
|
3179
|
+
InvalidOrigin = 'InvalidOrigin',
|
|
3180
|
+
InvalidService = 'InvalidService',
|
|
3181
|
+
UnauthorizedUser = 'UnauthorizedUser',
|
|
3182
|
+
InvalidChain = 'InvalidChain',
|
|
3183
|
+
QuotaExceeded = 'QuotaExceeded',
|
|
3184
|
+
QuotaRateLimit = 'QuotaRateLimit',
|
|
3185
|
+
NoDefaultKey = 'NoDefaultKey',
|
|
3186
|
+
MaxAccessKeys = 'MaxAccessKeys',
|
|
3187
|
+
AtLeastOneKey = 'AtLeastOneKey',
|
|
2942
3188
|
Timeout = 'Timeout',
|
|
2943
|
-
InvalidArgument = 'InvalidArgument',
|
|
2944
3189
|
NotFound = 'NotFound',
|
|
2945
|
-
|
|
2946
|
-
ProjectNotFound = 'ProjectNotFound',
|
|
2947
|
-
InvalidTier = 'InvalidTier',
|
|
2948
|
-
ProjectLimitReached = 'ProjectLimitReached',
|
|
3190
|
+
InvalidArgument = 'InvalidArgument',
|
|
2949
3191
|
NotImplemented = 'NotImplemented'
|
|
2950
3192
|
}
|
|
2951
3193
|
|
|
@@ -2958,20 +3200,33 @@ export enum WebrpcErrorCodes {
|
|
|
2958
3200
|
WebrpcBadResponse = -5,
|
|
2959
3201
|
WebrpcServerPanic = -6,
|
|
2960
3202
|
WebrpcInternalError = -7,
|
|
2961
|
-
|
|
3203
|
+
WebrpcClientAborted = -8,
|
|
2962
3204
|
WebrpcStreamLost = -9,
|
|
2963
3205
|
WebrpcStreamFinished = -10,
|
|
2964
3206
|
Unauthorized = 1000,
|
|
2965
3207
|
PermissionDenied = 1001,
|
|
2966
3208
|
SessionExpired = 1002,
|
|
2967
3209
|
MethodNotFound = 1003,
|
|
2968
|
-
|
|
3210
|
+
RequestConflict = 1004,
|
|
3211
|
+
Aborted = 1005,
|
|
3212
|
+
Geoblocked = 1006,
|
|
3213
|
+
RateLimited = 1007,
|
|
3214
|
+
ProjectNotFound = 1008,
|
|
3215
|
+
SecretKeyCorsDisallowed = 1009,
|
|
3216
|
+
AccessKeyNotFound = 1101,
|
|
3217
|
+
AccessKeyMismatch = 1102,
|
|
3218
|
+
InvalidOrigin = 1103,
|
|
3219
|
+
InvalidService = 1104,
|
|
3220
|
+
UnauthorizedUser = 1105,
|
|
3221
|
+
InvalidChain = 1106,
|
|
3222
|
+
QuotaExceeded = 1200,
|
|
3223
|
+
QuotaRateLimit = 1201,
|
|
3224
|
+
NoDefaultKey = 1300,
|
|
3225
|
+
MaxAccessKeys = 1301,
|
|
3226
|
+
AtLeastOneKey = 1302,
|
|
3227
|
+
Timeout = 1900,
|
|
3228
|
+
NotFound = 2000,
|
|
2969
3229
|
InvalidArgument = 2001,
|
|
2970
|
-
NotFound = 3000,
|
|
2971
|
-
UserNotFound = 3001,
|
|
2972
|
-
ProjectNotFound = 3002,
|
|
2973
|
-
InvalidTier = 3003,
|
|
2974
|
-
ProjectLimitReached = 3005,
|
|
2975
3230
|
NotImplemented = 9999
|
|
2976
3231
|
}
|
|
2977
3232
|
|
|
@@ -2984,20 +3239,33 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
2984
3239
|
[-5]: WebrpcBadResponseError,
|
|
2985
3240
|
[-6]: WebrpcServerPanicError,
|
|
2986
3241
|
[-7]: WebrpcInternalErrorError,
|
|
2987
|
-
[-8]:
|
|
3242
|
+
[-8]: WebrpcClientAbortedError,
|
|
2988
3243
|
[-9]: WebrpcStreamLostError,
|
|
2989
3244
|
[-10]: WebrpcStreamFinishedError,
|
|
2990
3245
|
[1000]: UnauthorizedError,
|
|
2991
3246
|
[1001]: PermissionDeniedError,
|
|
2992
3247
|
[1002]: SessionExpiredError,
|
|
2993
3248
|
[1003]: MethodNotFoundError,
|
|
2994
|
-
[
|
|
3249
|
+
[1004]: RequestConflictError,
|
|
3250
|
+
[1005]: AbortedError,
|
|
3251
|
+
[1006]: GeoblockedError,
|
|
3252
|
+
[1007]: RateLimitedError,
|
|
3253
|
+
[1008]: ProjectNotFoundError,
|
|
3254
|
+
[1009]: SecretKeyCorsDisallowedError,
|
|
3255
|
+
[1101]: AccessKeyNotFoundError,
|
|
3256
|
+
[1102]: AccessKeyMismatchError,
|
|
3257
|
+
[1103]: InvalidOriginError,
|
|
3258
|
+
[1104]: InvalidServiceError,
|
|
3259
|
+
[1105]: UnauthorizedUserError,
|
|
3260
|
+
[1106]: InvalidChainError,
|
|
3261
|
+
[1200]: QuotaExceededError,
|
|
3262
|
+
[1201]: QuotaRateLimitError,
|
|
3263
|
+
[1300]: NoDefaultKeyError,
|
|
3264
|
+
[1301]: MaxAccessKeysError,
|
|
3265
|
+
[1302]: AtLeastOneKeyError,
|
|
3266
|
+
[1900]: TimeoutError,
|
|
3267
|
+
[2000]: NotFoundError,
|
|
2995
3268
|
[2001]: InvalidArgumentError,
|
|
2996
|
-
[3000]: NotFoundError,
|
|
2997
|
-
[3001]: UserNotFoundError,
|
|
2998
|
-
[3002]: ProjectNotFoundError,
|
|
2999
|
-
[3003]: InvalidTierError,
|
|
3000
|
-
[3005]: ProjectLimitReachedError,
|
|
3001
3269
|
[9999]: NotImplementedError
|
|
3002
3270
|
}
|
|
3003
3271
|
|