Empire Page return Error 500 when no moon on account



  • ## Bug Title ️ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    The empire page throw an error 500 when there is no moon whene we call ?page=standalone&component=empire&planetType=1
    On V12, we can call with planetType=99 for exemple and the empire page fall backs to moon display




    ## Account Nickname/ID ----------------------------------------------------------------------------------------------------------------------------------

    [Boubou / 100075]



    ## Account Type ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    [Discoverer]




    ## Device & Environment ---------------------------------------------------------------------------------------------------------------------------------------------------------

    - Device: [PC]

    - OS: [Windows]

    - Browser: [Chrome 147.0.7727.138]

    - Scripts/Extensions: [No]




    ## Steps to Reproduce ------------------------------------------------------------------------------------------------------------------------------------------------------------

    1.Create a new account

    2.try to access https://s808-en.ogame.gameforg…onent=empire&planetType=1




    ## Expected Result ------------------------------------------------------------------------------------------------------------------------------------------------------------------

    The page should fallback to the empire page with planets point or view if there is no moon on account




    ## Actual Result ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Error 500




    ## Frequency --------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    [Always]




    ## Evidence ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------


    pasted-from-clipboard.png



    ## Additional Notes -----------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Prongs

    Approved the thread.
  • Hello!


    Yes, but I'm referring to the request for the Empire view page via JavaScript, in the context of script and extension development.


    We've found a workaround: not requesting the page if the account doesn't have a moon.


    However, would it be possible to have an API containing all the information used by the Empire view? Currently, we have to parse the page and search for the JSON to generate it dynamically. An API that directly returns this JSON would be extremely useful for script and extension developers.


    Also: are there any new APIs we could use in this version 13?

  • I strongly support this request. For tool developers, an API that would allow them to retrieve all account data would be a huge improvement rather than having to struggle with the clunky Empire page.

  • Yes, that could be a great improvement and also free the game to generate more time expensive regular pages, that we fetch and use now to get data. An API that covers all the info we can get from diverse pages: empire, player LF bonus, resource settings and production queue, at least.