KatjaGlassConsulting / ApprovalBundle

A Kimai Plugin to manage weekly approval workflow
MIT License
11 stars 14 forks source link

Error 500: Internal Server Error, when use overtime endpoint #23

Closed vitormattos closed 7 months ago

vitormattos commented 7 months ago

The overtime also has some issues. I am still struggeling with the API. Does these work in your environment? You can to click your profile -> API access and then click the book icon "swagger api doc". When you have defined an api key, on the swagger api you can test it by authorization (use your username and api passoword) and then go to the api endpoint to test.

The swagger API doc does not open for me "{"code":500,"message":"Internal Server Error"}" - when I remove all approval APIs (rename .php to .php_ for example), then the doc is up and running.

Nevertheless, I already merge so that can be used as base.

Originally posted by @KatjaGlassConsulting in https://github.com/KatjaGlassConsulting/ApprovalBundle/issues/22#issuecomment-1842195830

vitormattos commented 7 months ago

Hi @KatjaGlassConsulting I didn't tested this. I'm working to finish a very big release of LibreSign and I wish to create a new release next week. I will check this point as a possible.

Only to explain about my environment because maybe would possible provide insights to your developer environment.

I run Kimai in a container using this project that I created based in official docker image of Kimai: https://github.com/LibreCodeCoop/kimai-docker

When you look the answer of API endpoint with APP_ENV=dev enabled, will be possible look the backtrace. I commonly look the error message and the backtrace to put a breakpoint

When you put a breakpoint in your IDE, and start to listening the xdebug, will be possible look the context of error.

Returning about the error that you reported, I wish to return helping your project at next week

KatjaGlassConsulting commented 7 months ago

The issue was the usage of "Request", I changed to ParamFetcherInterface instead of Request and now it's working. For this I closed the #21 issue. It's in the kimai_v2_update branch already. I have to admit I didn't do much php debugging so far and are more using the file_put_contents.

Thanks and I will close this issue now. The kimai v2 migration is still open as there are some other issues available.