import requests


def make_json_request(url):
    """Make a json request and handle status codes."""
    r = requests.get(url)
    if r.status_code != 200:
        raise Exception(f"Bad request status_code: {r.status_code}")
    return r.json()