A248 / LibertyBans

The be-all, end-all of discipline.
https://ci.hahota.net:8443/job/LibertyBans/
GNU Affero General Public License v3.0
168 stars 42 forks source link

[Bug Report]: Stacktrace when user is not found #181

Closed A248 closed 1 year ago

A248 commented 1 year ago

LibertyBans Version

Don't know, sorry

I have confirmed that ...

Platform

Spigot/Paper

Description

I'm sorry for not reporting the LibertyBans version or attempting to update the plugin, however I hope you can still accept my bug report. It seems related to an issue in a library you also wrote and rely upon in LibertyBans.

Here's a relevant stacktrace:

[14:49:03 WARN]: [space.arim.libertybans.core.uuid.RemoteApiBundle] Request for name to remote web API space.arim.api.util.web.HttpMojangApi@572620c8 failed
space.arim.api.util.web.HttpNon200StatusCodeException: Status code 404
        at space.arim.api.util.web.MojangApiRequest.lambda$queryMojangApi$0(MojangApiRequest.java:63) ~[LibertyBans-ClassLoader:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
        at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:844) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]

As you can see the Mojang API is yielding 404 instead of 204 as it used to. This is a pretty minor bug as only staff members can issue these commands. However, it still presents occasional confusion for the uninitiated.

So I'm hoping you can catch the new status code here and print the player-not-found message instead.