Skip to content

Commit bdb4c80

Browse files
Debug logs.
1 parent 47a6ed2 commit bdb4c80

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

app/src/resources/labware_offsets/useNotifyLabwareOffsetsQuery.ts

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export function useNotifySearchLabwareOffsets(
2121
topic: 'robot-server/labwareOffsets',
2222
options,
2323
})
24+
console.error('MAX: useNotifySearchLabwareOffsets', {
25+
request,
26+
options,
27+
shouldRefetch,
28+
queryOptionsNotify,
29+
})
2430

2531
const httpQueryResult = useSearchLabwareOffsets(request, queryOptionsNotify)
2632

app/src/resources/useNotifyDataReady.ts

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ export function useNotifyDataReady<TData, TError = Error>({
9797
}, [topic, hostname, shouldUseNotifications])
9898

9999
const onDataEvent = useCallback((data: NotifyResponseData): void => {
100+
if (topic === 'robot-server/labwareOffsets') {
101+
console.error('MAX onDataEvent:', data)
102+
}
100103
if (data === 'ECONNFAILED' || data === 'ECONNREFUSED') {
101104
setIsNotifyEnabled(false)
102105
if (data === 'ECONNREFUSED') {
@@ -112,7 +115,10 @@ export function useNotifyDataReady<TData, TError = Error>({
112115

113116
const notifyOnSettled = useCallback(
114117
(data: TData | undefined, error: TError | null) => {
118+
console.error('MAX: notifyOnSettled')
119+
115120
if (refetch === 'once') {
121+
console.error('MAX: notifyOnSettled and set refetch to null')
116122
setRefetch(null)
117123
}
118124
options.onSettled?.(data, error)

0 commit comments

Comments
 (0)