Skip to content

Commit 3c8bbde

Browse files
committed
improve query validation errors
1 parent 4923474 commit 3c8bbde

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/common/utils/httpHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const validateRequest =
1717
schema.parse({ body: req.body, query: req.query, params: req.params })
1818
next()
1919
} catch (err) {
20-
const errorMessage = `Invalid input: ${(err as ZodError).errors.map((e) => e.message).join(", ")}`
20+
const errorMessage = `Invalid input: ${(err as ZodError).errors.map((e) => `${e.path?.join(".")}: ${e.message}`).join(", ")}`
2121
const statusCode = StatusCodes.BAD_REQUEST
2222
const serviceResponse = ServiceResponse.failure(errorMessage, statusCode)
2323
return handleServiceResponse(serviceResponse, res)

tokenLists/tokenList_8453.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,14 @@
231231
"decimals": 18,
232232
"logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/28656.png",
233233
"meta": {}
234+
},
235+
{
236+
"addressInfo": "0xE9185Ee218cae427aF7B9764A011bb89FeA761B4",
237+
"chainId": 8453,
238+
"name": "BRZ",
239+
"symbol": "BRZ",
240+
"decimals": 18,
241+
"logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/28656.png",
242+
"meta": {}
234243
}
235244
]

0 commit comments

Comments
 (0)