Page MenuHomePhabricator

Display API failure errors in the IPInfo popup
Closed, ResolvedPublic3 Estimated Story Points

Description

After T260604: Display a popup with fixed mock data for an IP address on the specified page(s), mock data is displayed in the IPInfo popup, when the API successfully returns data.

When the API responds with a failure code, we should also display an appropriate failure message.

Questions:

  • What should the error message look like?(See below)~~

Note that T263409 is specifically for displaying timeout errors.

Popup error states:

image.png (162×564 px, 22 KB)

Figma

AC

  • API returns an error message key
  • front-end consumes the key to produce user-readable text

Event Timeline

@Prtksxna Adding this to your column. Let's talk more about this in our meeting.

Here are some of the current error messages for logs and revisions and the circumstances when they appear. I am not sure it is exhaustive:

CaseHTTP codeLog MessageRevision Message
Logged out401"You do not have permission to perform the action""You do not have permission to perform the action"
User pref disabled or no ipinfo right403"You do not have permission to perform the action""You do not have permission to perform the action"
Log or revision does not exist404"Log entry does not exist""The specified revision (<rev id>) does not exist"
User does not have permission to log/revision403"Your account does not have access to view the performer of the log entry or the log entry itself""Your account does not have access to view the author of the revision"
Log/revision is not an IP404"Cannot retrieve ipinfo for logs of registered users""Cannot retrieve ipinfo for revisions of registered users"
No error, but API returns no information200"There is no data for this IP address from GeoIp2""There is no data for this IP address from GeoIp2"
STran set the point value for this task to 3.
STran subscribed.

Duplicate (see tickets above)