Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Hono client issues with newrelic? - Hono
H
Hono
•
2y ago
•
3 replies
Hellno009
Hono client issues with newrelic?
Guys
, I almost gave up
.
. I cant solve the issue
:
- I added newrelic for monitoring
- All my endpoints goes to 401 Unauthorized
I started to debug and im using hono with react query
:
So basically this one not works If I start my app with newrelic
:
import
{ client
} from
"
@
/lib
/hono
"
;
import
{ useQuery
} from
"
@tanstack
/react
-query
"
;
import
{ TrackedTimeResponse
} from
"
@
/features
/statistics
/types
"
;
export const useGetTrackedTime
=
(
)
=
>
{
return useQuery
<TrackedTimeResponse
, Error
>
(
{
queryKey
:
[
"get
-tracked
-time
"
]
,
queryFn
: async
(
)
=
>
{
try
{
const response
= await client
.api
.statistics
[
"get
-tracked
-time
"
]
.
$get
(
)
;
if
(
!response
.ok
)
{
throw new Error
(
API Error: ${response.status} ${response.statusText}
API Error: ${response.status} ${response.statusText}
)
;
}
const data
= await response
.json
(
)
;
return data
;
} catch
(error
)
{
console
.error
(
"Error in
u
s
e
G
e
t
T
r
a
c
k
e
d
T
i
m
e
:
"
, error
)
;
throw error
;
}
}
,
}
)
;
}
;
But
.
. If I remove hono client and just make simple fetch
(or even If I try this endpoint on my browser
)
:
export const useGetTrackedTime
=
(
)
=
>
{
return useQuery
<TrackedTimeResponse
, Error
>
(
{
queryKey
:
[
"get
-tracked
-time
"
]
,
queryFn
: async
(
)
=
>
{
try
{
const response
= await fetch
(
'
/api
/statistics
/get
-tracked
-time
'
)
;
if
(
!response
.ok
)
{
throw new Error
(
'Failed to fetch data
'
)
;
}
return response
.json
(
)
;
} catch
(error
)
{
throw error
;
}
}
,
}
)
;
}
;
It works and returns 200
.
Any have anything similar
? Any recommendations
?
Hono
Join
This is the official Hono discord server for the community
4,418
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Hono Client Double-Prefixing Issue
H
Hono / help
11mo ago
Optional params in hono/client
H
Hono / help
2y ago
hono aws lambda 404 issues
H
Hono / help
11mo ago
Vitest with Hono
H
Hono / help
2y ago