<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_complete(cls, req):
 """ Callback called when the request was received. """

        # handle http errors
        if not (req.status == 200 or req.status == 0):
            alert("Couldn't connect to authority base.")
            LogView.add(
                "Error when calling Aleph authority base: %s" % req.text
            )
            AuthorBar.hide()
            return

        AuthorBar.hide()
        cls.set_select(json.loads(req.text))