pathom

2023-07-18T18:18:14.267899Z

@wilkerlucio: Is there an easy way to limit the length of Pathom exception logs? We have well over 200 resolvers now and the exceptions are unwieldy. (And are crapping up production logs as well.)

wilkerlucio 2023-07-18T18:21:55.172119Z

hello, I'm interested to understand how it gets there, its for sure something I'm looking forward to improve (the error handling/reporting)

wilkerlucio 2023-07-18T18:22:05.957639Z

can you tell me what you see there, that we might be able to avoid/eliminate?

2023-07-18T18:24:28.361069Z

It’s dumping huge paths that seem to involve every resolver.

2023-07-18T18:24:53.801229Z

There will be the call stack, the exception message, then an enormous Pathom path.

wilkerlucio 2023-07-18T18:25:07.680159Z

is there many optionals that might be accumulating errors from possible paths that failed? or its more straithforward?

2023-07-18T18:28:17.377379Z

I just generated a simple one by querying a non-existent key…

2023-07-18T18:28:57.505109Z

And admittedly it’s not overly long. But most of the text is generated on the :com.wsscode.pathom3.connect.planner/graph key.

wilkerlucio 2023-07-18T18:28:59.271579Z

that's a good point to note, because we can change these to not be exceptions, or make them simpler exceptions

2023-07-18T18:29:35.440959Z

Lots of lists and maps that would be very hard to make use of, and instead make for a lot of scrolling.

wilkerlucio 2023-07-18T18:29:39.132419Z

yeah, I've been thinking about it, removing the graph from the exception data, and make accessing it indirect (so they dont bloat the exceptions)

2023-07-18T18:30:29.639279Z

The other verbose piece is having to trace the exception message itself back to your own code, skipping the Pathom namespaces.

2023-07-18T18:30:34.786509Z

That might not be in your hands to overcome.

wilkerlucio 2023-07-18T18:31:56.466079Z

can you make a demo repro of a bad one similar to what you see, so I can work on top of it here?

2023-07-18T18:33:09.679029Z

Might be kind of hard… seems like a function of the number of resolvers…

2023-07-18T18:33:25.002059Z

How about I private message you with an exception?

👍 1
2023-07-18T18:33:32.452079Z

This is one of the shorter ones I’ve seen.

2023-07-18T18:34:34.126189Z

Mmm, it’s too big to send over Slack.

2023-07-18T18:39:34.212579Z

If you send me an email address, or something, I can get you the full log. Otherwise I’ll think on a way to make a repo.