fix: add apiResponse.text() to logging

This commit is contained in:
Arvid Norlin
2024-08-23 08:36:14 +02:00
committed by Michael Zetterberg
parent 7cd6367c15
commit 9497e8eef3
6 changed files with 86 additions and 26 deletions

View File

@@ -50,6 +50,7 @@ export const hotelQueryRouter = router({
)
if (!apiResponse.ok) {
const text = await apiResponse.text()
console.error(
"api.hotels.hotel error",
JSON.stringify({
@@ -57,6 +58,7 @@ export const hotelQueryRouter = router({
error: {
status: apiResponse.status,
statusText: apiResponse.statusText,
text,
},
})
)