We are using apolloExceptionHandler, but the exceptions is has are commonly super noisy and not critical so we can'e enable it without sampling or discarding certain errors. At the same time, we want to record unexpected/unknown errors. We need some way to differentiate, either by having a code, or custom exception types.
An example of a problematic case is:
apolloExceptionHandler(
Exception(
"Cannot merge incoming connection: received page is not adjacent to existing pages. " +
"existingStartCursor=$existingStartCursor, existingEndCursor=$existingEndCursor, " +
"incomingStartCursor=$incomingStartCursor, incomingEndCursor=$incomingEndCursor, incomingBeforeArgument=$incomingBeforeArgument, incomingAfterArgument=$incomingAfterArgument.",
),
)
Where the only way to special case this error is to string match.
We are using apolloExceptionHandler, but the exceptions is has are commonly super noisy and not critical so we can'e enable it without sampling or discarding certain errors. At the same time, we want to record unexpected/unknown errors. We need some way to differentiate, either by having a code, or custom exception types.
An example of a problematic case is:
Where the only way to special case this error is to string match.