404 messages are confusing #3

Open
opened 2025-06-23 12:42:28 +09:00 by spivee · 1 comment
Member

If you use an address that doesn't exist in the hive server, even if it has funds, you get a 404 message like

{error,#{info =>
             #{info =>
                   #{error => get_failed,
                     data =>
                         {error,#{code => 404,msg => "Not Found",
                                  body =>
                                      "{\"errors\":{\"detail\":\"Not Found\"}}"}},
                     url =>
                         "https://gajumining.com/api/workers/ak_2gTvLeZtXJnFH4CM8vMv4iytr41iwHJjMtNcut61MgkisYrAYE"},
               line => 61,module => gmhc_eureka},
         time => {1750,649471,172000},
         sender => <0.785.0>}}
{error,#{info =>
             #{info => #{error => connect_failure,data => {error,failed}},
               line => 46,module => gmhc_eureka},
         time => {1750,649471,173000},
         sender => <0.785.0>}}

but in the default window size, only the second part is visible. People think they have a connection problem, when it is clearly the address that is the issue, especially if any other gajumining.com/api requests have succeeded.

We should check that the api is up, and that the wallet is up, to properly troubleshoot:

  • 404 because the whole API is down/misconfigured
  • 404 because the address has never logged in to gajumining.com
  • neither of the above, try and mine and see if something else goes wrong

Then the first two can produce helpful popup windows before mining even starts, like "Mining API is down." or "Mining account 'ak_blah' does not exist. Please use an address that has been activated for your mining package.", which may prompt users to solve the problem themselves, or at least make troubleshooting faster for us.

If you use an address that doesn't exist in the hive server, even if it has funds, you get a 404 message like ``` {error,#{info => #{info => #{error => get_failed, data => {error,#{code => 404,msg => "Not Found", body => "{\"errors\":{\"detail\":\"Not Found\"}}"}}, url => "https://gajumining.com/api/workers/ak_2gTvLeZtXJnFH4CM8vMv4iytr41iwHJjMtNcut61MgkisYrAYE"}, line => 61,module => gmhc_eureka}, time => {1750,649471,172000}, sender => <0.785.0>}} {error,#{info => #{info => #{error => connect_failure,data => {error,failed}}, line => 46,module => gmhc_eureka}, time => {1750,649471,173000}, sender => <0.785.0>}} ``` but in the default window size, only the second part is visible. People think they have a connection problem, when it is clearly the address that is the issue, especially if any other `gajumining.com/api` requests have succeeded. We should check that the api is up, and that the wallet is up, to properly troubleshoot: - 404 because the whole API is down/misconfigured - 404 because the address has never logged in to gajumining.com - neither of the above, try and mine and see if something else goes wrong Then the first two can produce helpful popup windows before mining even starts, like "Mining API is down." or "Mining account 'ak_blah' does not exist. Please use an address that has been activated for your mining package.", which may prompt users to solve the problem themselves, or at least make troubleshooting faster for us.
Owner

I've been meaning to fix that. I want to match on the 404 message explicitly and show something like your ""Mining account 'ak_blah' does not exist" message.

I've been meaning to fix that. I want to match on the 404 message explicitly and show something like your ""Mining account 'ak_blah' does not exist" message.
spivee added the
pig lipstick
label 2025-06-26 19:49:29 +09:00
Sign in to join this conversation.
No Milestone
No project
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/GajuMine#3
No description provided.