There's no guarantee that the ``QUERY_PARAMS`` for ``start_line`` and ``end_line`` will be provided by the caller. So providing some default values to ``get`` would be a good idea,  ``request.QUERY_PARAMS.get("start_line", 0)``. It's fine if nothing is returned in the default case. Another possible issue, and this may be handled by the django rest api, is receiving non-integer data for ``start_line`` and ``end_line``. If you pass a value to ``int()`` like a string that cannot be cast to an int, a ``ValueError`` will be raised, probably don't want that to bubble up if we can catch it in a ``try/except`` and return a message. That will be cheaper and safer than bubbling up to a 500 error. I suspect there are other web service methods that may need to ``try/except`` explicit ``int()`` casts...