Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDC logs 404 errors in logs #1268

Open
florianrusch-zf opened this issue Apr 30, 2024 · 6 comments
Open

EDC logs 404 errors in logs #1268

florianrusch-zf opened this issue Apr 30, 2024 · 6 comments
Labels
bug Something isn't working triage all new issues awaiting classification

Comments

@florianrusch-zf
Copy link
Contributor

florianrusch-zf commented Apr 30, 2024

Describe the bug

Every time an endpoint is been request, where the EDC doesn't serve anything he is logging jakarta.ws.rs.NotFoundException to his logs, which could be very spamy and should be avoided. Basically all 2** and 4** http errors are normally not necessary to be logged at all.

image

Logging config is the one which is configured on default in the helm chart.

To Reproduce

Steps to reproduce the behavior:

  1. Call any none existing path
  2. See exception in log

Expected behavior

All 2** and 4** http errors shouldn't be visible in the normal logs (but maybe it make sense to log them if debug logs are activated).

@florianrusch-zf florianrusch-zf added bug Something isn't working triage all new issues awaiting classification labels Apr 30, 2024
@ndr-brt
Copy link
Contributor

ndr-brt commented Apr 30, 2024

out of curiosity, what caused that 404?

@florianrusch-zf
Copy link
Contributor Author

florianrusch-zf commented May 2, 2024

out of curiosity, what caused that 404?

I am trying to set up EDC 0.7.0 for the first time. It has been started, but for whatever reason I can't reach any of the endpoints I know of (I just get 404s and something like Object of type Asset with ID=request was not found). I'm currently debugging into it to see what I'm doing wrong. I guess it's an OSI layer 8 problem 😉

EDIT: As told, layer 8 problem..../v3/assets/request needs to be called as POST and not GET 🙈

@saschaisele-zf saschaisele-zf self-assigned this May 13, 2024
Copy link
Contributor

This issue is stale because it has been open for 4 weeks with no activity.

Copy link
Contributor

This issue is stale because it has been open for 4 weeks with no activity.

@github-actions github-actions bot added the stale label Jul 22, 2024
@saschaisele-zf saschaisele-zf removed their assignment Jul 22, 2024
@bmg13
Copy link

bmg13 commented Aug 23, 2024

hey @florianrusch-zf can you help me here, please, I have two questions.
The only 4XX I can replicate similar to this is the 405 (method not allowed) when calling incorrect verb (as you mentioned in your last comment).
Regarding the NOT FOUND the stack trace is not generated and the message you presented ("Object of type Asset with ID=test-asset-s4 was not found") is returned, as expected. But, again, I cannot see the 404 stack trace you showed.

So, my questions are:

  • How did you replicated the 404 stack trace?
  • Shouldn't the 405 be kept as a full exception print? I know it is a 4XX and could be not needed to have all the info dump, but is expected behaviour since this error should never happen with correct API usage.

Proposed technical solution:
If it really is to be fixed, I Believe that in here https://github.com/eclipse-edc/Connector/blob/main/extensions/common/http/jersey-core/src/main/java/org/eclipse/edc/web/jersey/mapper/UnexpectedExceptionMapper.java#L47 the log would include only the message and not the full stack trace, something like
monitor.severe("JerseyExtension: Unexpected exception caught. " + exception.getMessage());

However this would affect any error status case, I believe. @ndr-brt Can you give your input here as well, please?
thank you both 🙇

@ndr-brt
Copy link
Contributor

ndr-brt commented Sep 19, 2024

@bmg13 I definitely think this is something to bring upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage all new issues awaiting classification
Projects
None yet
Development

No branches or pull requests

4 participants