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 : Ensure galaxy, system, position and type available #610

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

jackbayliss
Copy link
Collaborator

@jackbayliss jackbayliss commented Mar 10, 2025

Description

When using the fleet system and emptying the galaxy box for instance, if you switch from say planet to moon, it will cause an exception and forever load.

Found this while looking into exceptions via webhook.

This basically ensures all the params are there, otherwise it'll stop loading - this seems to make the most sense here as it's where the params are being prepared to post.

Type of Change:

  • Bug fix

Related Issues

Fixes #609

Checklist

  • CSS & JS Build: CSS and JS assets are compiled using Laravel Mix if any changes are made to JS/CSS files.

@jackbayliss jackbayliss requested a review from lanedirt March 10, 2025 00:05
@lanedirt
Copy link
Owner

Looks good to me! 👍 I did try and check just now though how the official game handles this, and if I reproduce it on there I see that the fleet check call still comes with a valid response when the position is empty:

Screenshot 2025-03-10 at 09 30 22

So I'm guessing that they are defaulting the position (or any other coordinates) to "0" on the serverside, so even if the client does not pass along a value the server side call still succeeds and returns a valid response (with no planets/missions found, which is fine). I'm not sure how complicated it is to change the server side logic for this call to make it work without changing the client side JS, but either way seems like a fine solution to me to prevent the exception/hanging loader.

@jackbayliss
Copy link
Collaborator Author

Merging for now, as will prevent the errors-- then will potentially refactor the backend at a later point.

@jackbayliss jackbayliss merged commit 402e165 into lanedirt:main Mar 10, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

[BUG] Changing fleet destination while a param is empty causes exception
2 participants