8cf7b3d348ab23c2d0b0a232a19e00502d804109,controllers/errors.py,,index,#,58

Before Change


    request_url = request.vars["request_url"]
    path = request_url.split("/")
    ext = [a for a in path if "." in a]
    if ext:
        fmt = ext[-1].rsplit(".", 1)[1].lower()
        if fmt not in ("html", "iframe", "popup"):
            xml = current.xml
            code = request.vars["code"]
            headers = {"Content-Type":"application/json"}
            raise HTTP(int(code),
                       body=xml.json_message(False, code, description),
                       **headers)

    details = " %s, %s " % (code, description)
    try:
        message, suggestions = error_messages[code]
    except KeyError:

After Change



    // Retain the HTTP status code on error pages
    response.status = 400 if code == "NA" else code
    return {"res": request.vars,
            "message": message,
            "details": details,
            "suggestions": suggestions,
            "app": appname,
            }
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: sahana/eden
Commit Name: 8cf7b3d348ab23c2d0b0a232a19e00502d804109
Time: 2019-12-19
Author: dominic@nursix.org
File Name: controllers/errors.py
Class Name:
Method Name: index


Project Name: NervanaSystems/nlp-architect
Commit Name: 11187c1fd28a0c9a11836aa8b27cc21e47b6855f
Time: 2018-11-11
Author: peteriz@users.noreply.github.com
File Name: nlp_architect/api/intent_extraction_api.py
Class Name: IntentExtractionApi
Method Name: display_results


Project Name: biolab/orange3
Commit Name: 748586e3f55c6c0a97cf768ec4ab31f7f63d6dab
Time: 2013-07-22
Author: martin.frlin@gmail.com
File Name: Orange/widgets/data/owsave.py
Class Name: OWSave
Method Name: OWSave_1