Skip to content

Commit 8c43ba9

Browse files
committed
feat: expose errors related to fetching off-chain metadata
1 parent c2fb0c7 commit 8c43ba9

7 files changed

Lines changed: 323 additions & 0 deletions

File tree

blockfrost-openapi.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7552,6 +7552,26 @@ components:
75527552
type: string
75537553
description: Content of the metadata (raw)
75547554
nullable: true
7555+
error:
7556+
type: object
7557+
nullable: true
7558+
description: Present when metadata could not be fetched or validated.
7559+
properties:
7560+
code:
7561+
type: string
7562+
description: Stable machine-readable error code.
7563+
enum:
7564+
- HASH_MISMATCH
7565+
- CONNECTION_ERROR
7566+
- HTTP_RESPONSE_ERROR
7567+
- DECODE_ERROR
7568+
- SIZE_EXCEEDED
7569+
message:
7570+
type: string
7571+
description: Human-readable description of the error.
7572+
required:
7573+
- code
7574+
- message
75557575
required:
75567576
- id
75577577
- tx_hash
@@ -9841,6 +9861,27 @@ components:
98419861
nullable: true
98429862
example: 47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
98439863
description: Hash of the metadata file
9864+
error:
9865+
type: object
9866+
nullable: true
9867+
description: Present when metadata could not be fetched or validated.
9868+
properties:
9869+
code:
9870+
type: string
9871+
description: Stable machine-readable error code.
9872+
enum:
9873+
- HASH_MISMATCH
9874+
- CONNECTION_ERROR
9875+
- HTTP_RESPONSE_ERROR
9876+
- DECODE_ERROR
9877+
- SIZE_EXCEEDED
9878+
- UNKNOWN_ERROR
9879+
message:
9880+
type: string
9881+
description: Human-readable description of the error.
9882+
required:
9883+
- code
9884+
- message
98449885
ticker:
98459886
type: string
98469887
nullable: true
@@ -10214,6 +10255,27 @@ components:
1021410255
nullable: true
1021510256
example: 47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
1021610257
description: Hash of the metadata file
10258+
error:
10259+
type: object
10260+
nullable: true
10261+
description: Present when metadata could not be fetched or validated.
10262+
properties:
10263+
code:
10264+
type: string
10265+
description: Stable machine-readable error code.
10266+
enum:
10267+
- HASH_MISMATCH
10268+
- CONNECTION_ERROR
10269+
- HTTP_RESPONSE_ERROR
10270+
- DECODE_ERROR
10271+
- SIZE_EXCEEDED
10272+
- UNKNOWN_ERROR
10273+
message:
10274+
type: string
10275+
description: Human-readable description of the error.
10276+
required:
10277+
- code
10278+
- message
1021710279
ticker:
1021810280
type: string
1021910281
nullable: true

docs/blockfrost-openapi.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7963,6 +7963,26 @@ components:
79637963
type: string
79647964
description: Content of the metadata (raw)
79657965
nullable: true
7966+
error:
7967+
type: object
7968+
nullable: true
7969+
description: Present when metadata could not be fetched or validated.
7970+
properties:
7971+
code:
7972+
type: string
7973+
description: Stable machine-readable error code.
7974+
enum:
7975+
- HASH_MISMATCH
7976+
- CONNECTION_ERROR
7977+
- HTTP_RESPONSE_ERROR
7978+
- DECODE_ERROR
7979+
- SIZE_EXCEEDED
7980+
message:
7981+
type: string
7982+
description: Human-readable description of the error.
7983+
required:
7984+
- code
7985+
- message
79667986
required:
79677987
- id
79687988
- tx_hash
@@ -10382,6 +10402,27 @@ components:
1038210402
example: >-
1038310403
47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
1038410404
description: Hash of the metadata file
10405+
error:
10406+
type: object
10407+
nullable: true
10408+
description: Present when metadata could not be fetched or validated.
10409+
properties:
10410+
code:
10411+
type: string
10412+
description: Stable machine-readable error code.
10413+
enum:
10414+
- HASH_MISMATCH
10415+
- CONNECTION_ERROR
10416+
- HTTP_RESPONSE_ERROR
10417+
- DECODE_ERROR
10418+
- SIZE_EXCEEDED
10419+
- UNKNOWN_ERROR
10420+
message:
10421+
type: string
10422+
description: Human-readable description of the error.
10423+
required:
10424+
- code
10425+
- message
1038510426
ticker:
1038610427
type: string
1038710428
nullable: true
@@ -10760,6 +10801,27 @@ components:
1076010801
nullable: true
1076110802
example: 47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
1076210803
description: Hash of the metadata file
10804+
error:
10805+
type: object
10806+
nullable: true
10807+
description: Present when metadata could not be fetched or validated.
10808+
properties:
10809+
code:
10810+
type: string
10811+
description: Stable machine-readable error code.
10812+
enum:
10813+
- HASH_MISMATCH
10814+
- CONNECTION_ERROR
10815+
- HTTP_RESPONSE_ERROR
10816+
- DECODE_ERROR
10817+
- SIZE_EXCEEDED
10818+
- UNKNOWN_ERROR
10819+
message:
10820+
type: string
10821+
description: Human-readable description of the error.
10822+
required:
10823+
- code
10824+
- message
1076310825
ticker:
1076410826
type: string
1076510827
nullable: true

openapi.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10327,6 +10327,32 @@
1032710327
"type": "string",
1032810328
"description": "Content of the metadata (raw)",
1032910329
"nullable": true
10330+
},
10331+
"error": {
10332+
"type": "object",
10333+
"nullable": true,
10334+
"description": "Present when metadata could not be fetched or validated.",
10335+
"properties": {
10336+
"code": {
10337+
"type": "string",
10338+
"description": "Stable machine-readable error code."
10339+
},
10340+
"enum": [
10341+
"HASH_MISMATCH",
10342+
"CONNECTION_ERROR",
10343+
"HTTP_RESPONSE_ERROR",
10344+
"DECODE_ERROR",
10345+
"SIZE_EXCEEDED"
10346+
],
10347+
"message": {
10348+
"type": "string",
10349+
"description": "Human-readable description of the error."
10350+
}
10351+
},
10352+
"required": [
10353+
"code",
10354+
"message"
10355+
]
1033010356
}
1033110357
},
1033210358
"required": [
@@ -13416,6 +13442,33 @@
1341613442
"example": "47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c",
1341713443
"description": "Hash of the metadata file"
1341813444
},
13445+
"error": {
13446+
"type": "object",
13447+
"nullable": true,
13448+
"description": "Present when metadata could not be fetched or validated.",
13449+
"properties": {
13450+
"code": {
13451+
"type": "string",
13452+
"description": "Stable machine-readable error code."
13453+
},
13454+
"enum": [
13455+
"HASH_MISMATCH",
13456+
"CONNECTION_ERROR",
13457+
"HTTP_RESPONSE_ERROR",
13458+
"DECODE_ERROR",
13459+
"SIZE_EXCEEDED",
13460+
"UNKNOWN_ERROR"
13461+
],
13462+
"message": {
13463+
"type": "string",
13464+
"description": "Human-readable description of the error."
13465+
}
13466+
},
13467+
"required": [
13468+
"code",
13469+
"message"
13470+
]
13471+
},
1341913472
"ticker": {
1342013473
"type": "string",
1342113474
"nullable": true,
@@ -13895,6 +13948,33 @@
1389513948
"example": "47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c",
1389613949
"description": "Hash of the metadata file"
1389713950
},
13951+
"error": {
13952+
"type": "object",
13953+
"nullable": true,
13954+
"description": "Present when metadata could not be fetched or validated.",
13955+
"properties": {
13956+
"code": {
13957+
"type": "string",
13958+
"description": "Stable machine-readable error code."
13959+
},
13960+
"enum": [
13961+
"HASH_MISMATCH",
13962+
"CONNECTION_ERROR",
13963+
"HTTP_RESPONSE_ERROR",
13964+
"DECODE_ERROR",
13965+
"SIZE_EXCEEDED",
13966+
"UNKNOWN_ERROR"
13967+
],
13968+
"message": {
13969+
"type": "string",
13970+
"description": "Human-readable description of the error."
13971+
}
13972+
},
13973+
"required": [
13974+
"code",
13975+
"message"
13976+
]
13977+
},
1389813978
"ticker": {
1389913979
"type": "string",
1390013980
"nullable": true,

openapi.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7963,6 +7963,26 @@ components:
79637963
type: string
79647964
description: Content of the metadata (raw)
79657965
nullable: true
7966+
error:
7967+
type: object
7968+
nullable: true
7969+
description: Present when metadata could not be fetched or validated.
7970+
properties:
7971+
code:
7972+
type: string
7973+
description: Stable machine-readable error code.
7974+
enum:
7975+
- HASH_MISMATCH
7976+
- CONNECTION_ERROR
7977+
- HTTP_RESPONSE_ERROR
7978+
- DECODE_ERROR
7979+
- SIZE_EXCEEDED
7980+
message:
7981+
type: string
7982+
description: Human-readable description of the error.
7983+
required:
7984+
- code
7985+
- message
79667986
required:
79677987
- id
79687988
- tx_hash
@@ -10382,6 +10402,27 @@ components:
1038210402
example: >-
1038310403
47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
1038410404
description: Hash of the metadata file
10405+
error:
10406+
type: object
10407+
nullable: true
10408+
description: Present when metadata could not be fetched or validated.
10409+
properties:
10410+
code:
10411+
type: string
10412+
description: Stable machine-readable error code.
10413+
enum:
10414+
- HASH_MISMATCH
10415+
- CONNECTION_ERROR
10416+
- HTTP_RESPONSE_ERROR
10417+
- DECODE_ERROR
10418+
- SIZE_EXCEEDED
10419+
- UNKNOWN_ERROR
10420+
message:
10421+
type: string
10422+
description: Human-readable description of the error.
10423+
required:
10424+
- code
10425+
- message
1038510426
ticker:
1038610427
type: string
1038710428
nullable: true
@@ -10760,6 +10801,27 @@ components:
1076010801
nullable: true
1076110802
example: 47c0c68cb57f4a5b4a87bad896fc274678e7aea98e200fa14a1cb40c0cab1d8c
1076210803
description: Hash of the metadata file
10804+
error:
10805+
type: object
10806+
nullable: true
10807+
description: Present when metadata could not be fetched or validated.
10808+
properties:
10809+
code:
10810+
type: string
10811+
description: Stable machine-readable error code.
10812+
enum:
10813+
- HASH_MISMATCH
10814+
- CONNECTION_ERROR
10815+
- HTTP_RESPONSE_ERROR
10816+
- DECODE_ERROR
10817+
- SIZE_EXCEEDED
10818+
- UNKNOWN_ERROR
10819+
message:
10820+
type: string
10821+
description: Human-readable description of the error.
10822+
required:
10823+
- code
10824+
- message
1076310825
ticker:
1076410826
type: string
1076510827
nullable: true

src/schemas/governance/proposal_metadata_v2.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,25 @@ properties:
3333
type: string
3434
description: Content of the metadata (raw)
3535
nullable: true
36+
error:
37+
type: object
38+
nullable: true
39+
description: Present when metadata could not be fetched or validated.
40+
properties:
41+
code:
42+
type: string
43+
description: Stable machine-readable error code.
44+
enum:
45+
- HASH_MISMATCH
46+
- CONNECTION_ERROR
47+
- HTTP_RESPONSE_ERROR
48+
- DECODE_ERROR
49+
- SIZE_EXCEEDED
50+
- UNKNOWN_ERROR
51+
message:
52+
type: string
53+
description: Human-readable description of the error.
54+
required: [code, message]
3655
required:
3756
- id
3857
- tx_hash

0 commit comments

Comments
 (0)