Ask HN: How to automate collecting HAR file while user is browsing

Hello

We are facing an intermittent issue in our web application where for some users for some reasons http requests are ending in error ( 400s ) esp. during token refresh with authentication server.

Normally, we would ask user to generate the HAR ( HTTP archive file ) and we inspect to find the root cause. However, at this time it is challenging to collect the HAR file manually because the error is not consistent. Sometimes it seems to goes away but suddenly appears causing bad user experience.

It is also hard to add logs etc. because the token refresh happens on the client side from the browser so technically there is no traces of it on the server side.

I am looking into ways to automate generating the HAR file but it seems not straightforward to do it.

If anyone of you have faces similar issue in the past and find a way to add such error logging in a web service let me know. Any other thoughts and suggestions are highly appreciated.

Thank you in advance.


Comments URL: https://news.ycombinator.com/item?id=42817554

Points: 11

# Comments: 9

https://news.ycombinator.com/item?id=42817554

Vytvořeno 1mo | 26. 1. 2025 12:10:03


Chcete-li přidat komentář, přihlaste se

Ostatní příspěvky v této skupině

Show HN: ArchGW – An open-source intelligent proxy server for prompts

Hi HN! This is Salman, Adil, Shuguang and Co working on ArchGW[1] - an open-source lightweight proxy server for prompts - written in Rust and built on top of Envoy[2]. Arch moves the critical but

5. 3. 2025 1:40:11 | Hacker news
Show HN: Scholium, Your Own Research Assistant

I built an AI-powered research agent designed to efficiently discover, summarize, and cite relevant academic papers based on user queries.

As a university student, I've written my share of essay

5. 3. 2025 1:40:10 | Hacker news