Paging: Error handling

Lines like this one:

    session_id = dynamic_params.get('session_id')

Could be written using square brackets instead, which would cause a KeyError.

These errors would need to get caught somehow.