Skip to content

fix(#5272): don't make Axios parse the content of the logfile as JSON#5289

Merged
SteKoe merged 1 commit into
codecentric:masterfrom
cdprete:fix/5272
Apr 23, 2026
Merged

fix(#5272): don't make Axios parse the content of the logfile as JSON#5289
SteKoe merged 1 commit into
codecentric:masterfrom
cdprete:fix/5272

Conversation

@cdprete
Copy link
Copy Markdown
Contributor

@cdprete cdprete commented Apr 21, 2026

Fixes #5272

@SteKoe SteKoe merged commit 79b84e2 into codecentric:master Apr 23, 2026
1 check passed
@cdprete cdprete deleted the fix/5272 branch April 23, 2026 17:03
@cdprete
Copy link
Copy Markdown
Contributor Author

cdprete commented Apr 23, 2026

Sorry @SteKoe if I didn't write a test for this (to avoid that in the future it breaks again due to something else and it goes unnoticed).

I tried to use https://vitest.dev/guide/mocking/requests.html in the test directly instead of in the global setup (to not impact the other tests) to mock the request, but I didn't manage to find a way to make axios point with its baseURL to the URL I set in the mock server request handler.
Even by making the Instance object expose the axios configuration/setup, so that I could change it in the tests to point to my URL, it was anyway always pointing to something else.

I don't know if there is maybe an env variable or so to influence the behaviour.

@cdprete
Copy link
Copy Markdown
Contributor Author

cdprete commented Apr 23, 2026

Ok, I should have dig deeper in the codebase 🤦

You already have it under https://github.com/codecentric/spring-boot-admin/blob/master/spring-boot-admin-server-ui/src/main/frontend/tests/setup.ts and use it.
Moreover, I could overwrite the handlers with https://mswjs.io/docs/best-practices/network-behavior-overrides.

cdprete added a commit to cdprete/spring-boot-admin that referenced this pull request Apr 23, 2026
cdprete added a commit to cdprete/spring-boot-admin that referenced this pull request Apr 23, 2026
cdprete added a commit to cdprete/spring-boot-admin that referenced this pull request Apr 23, 2026
cdprete added a commit to cdprete/spring-boot-admin that referenced this pull request Apr 23, 2026
SteKoe pushed a commit that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Logfile Content Incorrectly Parsed as Object in Log Tail View

2 participants