strichliste/strichliste-backend

Bug in POST /user/{userId}/transaction endpoint

Closed this issue · 10 comments

From the documentation:

Note: You can access this resource using the id or name as userId

I could not get this to work. Furthermore, instead of geting a UserNotFoundException as specified, I got an internal server error (500).

Do you have any serverlogs for me, or information which version exactly you're running?

And maybe... do you have a curl request to reproduce?

btw.. I like your profile image :)

curl -X POST -H 'Content-Type: application/json' -d '{"comment": "Bla bla", "amount": 100 }' https://$DOMAIN/api/user/foobar/transaction (You may have to try out different user names, I could not always trigger it. In case that's relevant, some of the display names have whitespace and emoji in them, although I did not put any of that into the URL.)

Version should be latest release, server logs CC @mweinelt I guess :)

btw.. I like your profile image :)

Thanks, credit goes to @ c0c0bird

Should be fixed in v1.8.1 backend-version. I couldn't test right now, because I don't have a local working setup, just IDE

these are log entries from yesterday :)

Indeed, the ones where the errors mentioned were caused.

Ah okay. Yes the error looks exactly what I expected looking at the code before my fix. can you try again with 1.8.1 as backend?

Updated the backend and ran into router errors.

Jul 15 15:53:00 burbon nginx[711378]: 2022/07/15 15:53:00 [error] 711378#711378: *460 FastCGI sent in stderr: "PHP message: [error] Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /static/js/main.7555bf73.chunk.js" (from "https://strichliste.w17.io/")" at /nix/store/yq9rsm7v89cj1vr86dp7145fg0pixpz1-strichliste-v1.8.1/vendor/symfony/http-kernel/EventListener/RouterListener.php line 136" while reading response header from upstream, client: 172.20.65.91, server: strichliste.w17.io, request: "GET /static/js/main.7555bf73.chunk.js HTTP/2.0", upstream: "fastcgi://unix:/run/phpfpm/strichliste.sock:", host: "strichliste.w17.io", referrer: "https://strichliste.w17.io/"
Jul 15 15:53:00 burbon nginx[711378]: 2022/07/15 15:53:00 [error] 711378#711378: *460 FastCGI sent in stderr: "PHP message: [error] Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /static/js/3.8c2f2b5e.chunk.js" (from "https://strichliste.w17.io/")" at /nix/store/yq9rsm7v89cj1vr86dp7145fg0pixpz1-strichliste-v1.8.1/vendor/symfony/http-kernel/EventListener/RouterListener.php line 136" while reading response header from upstream, client: 172.20.65.91, server: strichliste.w17.io, request: "GET /static/js/3.8c2f2b5e.chunk.js HTTP/2.0", upstream: "fastcgi://unix:/run/phpfpm/strichliste.sock:", host: "strichliste.w17.io", referrer: "https://strichliste.w17.io/"

frontend: f453fa643f3e52159b1965ea05afabd7a77c2e0d
backend: 1.8.1

yes... if you overwrite the directory with the new backend bundle, you have to re-add the frontend-stuff.
basically you have to do the same, this script does https://github.com/strichliste/strichliste/blob/master/.travis.yml

That's what happening if a new version get's released (soon)