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

Fix: Improve logs for insert login credentials #37

Open
AlexTraveylan opened this issue Nov 4, 2024 · 0 comments
Open

Fix: Improve logs for insert login credentials #37

AlexTraveylan opened this issue Nov 4, 2024 · 0 comments

Comments

@AlexTraveylan
Copy link

AlexTraveylan commented Nov 4, 2024

Describe the bug
Insert a login don't log error when fail.

To Reproduce
Steps to reproduce the behavior:

  1. curl -X POST "http://localhost:3000/api/login/insert?projectName=code-smell" -H "Content-Type: application/json" -d "{"login": {"authentication_url": "https://www.alextraveylan.fr/fr", "username": "toto", "password": "azerty"}}"
  2. It log :
    ecosonar_api | [LOGGER] 2024-11-04 09:05:15 info : INSERT LOGIN CREDENTIALS - insert credentials
    ecosonar_api | [LOGGER] 2024-11-04 09:05:35 error : %s
    ecosonar_api | [LOGGER] 2024-11-04 09:05:35 error : [object Object]
    ecosonar_api | [LOGGER] 2024-11-04 09:05:35 error : INSERT LOGIN CREDENTIALS - insert credentials into project code-smell encountered an error
  3. curl again
  4. It log :
    ecosonar_api | [LOGGER] 2024-11-04 09:14:47 info : INSERT LOGIN CREDENTIALS - insert credentials into project code-smell
    ecosonar_api | [LOGGER] 2024-11-04 09:14:51 info : INSERT LOGIN CREDENTIALS - insert succeeded

Expected behavior
It look i didnt understand how to register login_url but readable error should be usefull, i expect a beter error than "error : %s [object Object]".
And when i retry, i expect an error, the same behavior should log the same error, not a succes log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows
  • Browser: chrome
  • Version win10 22H2, chrome 130.0.6723.92

Additional context
Maybe fix the doc for this part, i have finally no idea how to register login_url, i thought i have follow the doc but it fail.

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

No branches or pull requests

1 participant