Created
March 11, 2017 19:02
-
-
Save v3ss0n/aa8020d96b107b6864caf9c1074e9f99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppStaticHandler(StaticFileHandler): | |
def write_error(self, status_code, **kwargs): | |
errors = [403, 404, 500, 503] | |
# FIXME: logging.info("status_code: %s" % status_code) | |
if status_code in [404]: | |
# self.set_status(200) | |
with open("./dist/index.html") as f: | |
self.write(f.read()) | |
else: | |
self.write("Unknown Error %s" % status_code) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment