Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Catch "Internal Error; We're upset too." correctly #238

Open
2 tasks
justalemon opened this issue Jul 13, 2018 · 2 comments
Open
2 tasks

Catch "Internal Error; We're upset too." correctly #238

justalemon opened this issue Jul 13, 2018 · 2 comments

Comments

@justalemon
Copy link

Issue

Sometimes, the profiles will be down (as usual) and shown like this:

image

The API response will be:

{"error": 404, "msg": "profile not found"}

I feel that OWAPI should return an 5XX code, because the profile could exist but is not available at this time.

The HTML code shows something like like this:

image

Links that cause the issue

(Surround the links with backticks. Use triple backticks for multiple lines.)

https://owapi.net/api/v3/u/Dad-12262/blob
https://playoverwatch.com/en-us/career/pc/Dad-12262

Hi! Thank you for helping OWAPI by submitting an issue.
Before you submit, please make sure you've done the following:

  • Google/Search previous issues to make sure it hasn't been answered before.

  • Ask if this is an OWAPI issue, or a Linux issue, etc.

    • OWAPI requires Python 3.5 or higher installed on a UNIX machine, and it's not really our job to troubleshoot random Linux errors.

Thanks!

@jp1337
Copy link
Contributor

jp1337 commented Jul 13, 2018 via email

@justalemon
Copy link
Author

I already got upset with Blizzard creating this error so often and on many profiles.

I have to say, the playoverwatch.com page is terribly made. Most of the time you can't even log in without an "Internal Server Error".

Is there a chance to get a 503 - Service Unavailable error for example?

I would recommend 502 Bad Gateway:

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Or maybe create your own error Code?

As far as I know, you can't create your own status codes. But in certain cases (like Discord) you can send them in the JSON response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants