Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

/s issues #56

Open
jackrosenthal opened this issue Feb 22, 2018 · 7 comments
Open

/s issues #56

jackrosenthal opened this issue Feb 22, 2018 · 7 comments
Assignees
Labels
bug low-hanging-fruit For issues that the fix is trivial

Comments

@jackrosenthal
Copy link
Contributor

  • /s without a survey id fails with 500 (should be 404)
  • /s with something that cannot be an integer fails (e.g., /s/foo)... should be 404
  • short urls for surveys are really pointless... I think our original thoughts would be that it would be easier to write on a white board, but we always use /attend anyway. Thoughts on changing this to /survey?
@jackrosenthal jackrosenthal added bug low-hanging-fruit For issues that the fix is trivial labels Feb 22, 2018
@sumnerevans
Copy link
Member

Have you changed your mind: #40 (comment)? If we change this, we should change all usages of short URLs to maintain consistency.

@jackrosenthal
Copy link
Contributor Author

No, I haven't changed my mind, and it's still consistent if we remove it.

Short URLs are for things that need to be quickly remembered or conveyed, for example, consider my personal homepage URL: http://inside.mines.edu/~jrosenth

The tilde notation is certainly not long, but it is easy to remember the path to my homepage and easy to type it as well.

Survey URLs are never "remembered" nor typed manually, therefore they do not need the short URLs.

@sumnerevans
Copy link
Member

Ok. I'm fine with changing to /survey instead, then.

@liamwarfield liamwarfield self-assigned this Mar 7, 2018
@liamwarfield
Copy link
Contributor

created a branch with fixes called survey-Bugs

@samsartor
Copy link
Contributor

samsartor commented Mar 17, 2018

@jackrosenthal @sumnerevans I just noticed this enter develop. I don't think we should have changed the survey endpoint. I originally chose it to be short so that we could easily email, share, and write non-attend survey links on the whiteboard, not because I planned on people remembering them. It is also more consistent with all the other short URLs we have.

@jackrosenthal
Copy link
Contributor Author

If it's /s, please use a textual identifier rather than a numeric id. The numeric id only makes sense if you are the application developer or the database.

@jackrosenthal
Copy link
Contributor Author

::

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/tg/_compat.py", line 87, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/tg/appwrappers/transaction_manager.py", line 79, in __call__
    response = self.next_handler(controller, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/appwrappers/caching.py", line 54, in __call__
    return self.next_handler(controller, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/appwrappers/session.py", line 71, in __call__
    response = self.next_handler(controller, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/appwrappers/identity.py", line 47, in __call__
    return self.next_handler(controller, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/appwrappers/i18n.py", line 71, in __call__
    return self.next_handler(controller, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/wsgiapp.py", line 285, in _dispatch
    return controller(environ, context)
  File "/srv/acm/site/acmwebsite/lib/base.py", line 27, in __call__
    return TGController.__call__(self, environ, context)
  File "/usr/local/lib/python3.5/dist-packages/tg/controllers/dispatcher.py", line 119, in __call__
    response = self._perform_call(context)
  File "/usr/local/lib/python3.5/dist-packages/tg/controllers/dispatcher.py", line 99, in _perform_call
    state = self._get_dispatchable(context, py_request.quoted_path_info)
  File "/usr/local/lib/python3.5/dist-packages/tg/controllers/dispatcher.py", line 73, in _get_dispatchable
    state = state.resolve()
  File "/usr/local/lib/python3.5/dist-packages/crank/dispatchstate.py", line 178, in resolve
    return self._root_dispatcher._dispatch(self, self._path)
  File "/usr/local/lib/python3.5/dist-packages/crank/objectdispatcher.py", line 178, in _dispatch
    state, current_args)
  File "/usr/local/lib/python3.5/dist-packages/crank/objectdispatcher.py", line 103, in _dispatch_controller
    return dispatcher(state, remainder)
  File "/usr/local/lib/python3.5/dist-packages/crank/objectdispatcher.py", line 160, in _dispatch
    return self._dispatch_first_found_default_or_lookup(state, remainder)
  File "/usr/local/lib/python3.5/dist-packages/crank/objectdispatcher.py", line 129, in _dispatch_first_found_default_or_lookup
    new_controller, new_remainder = meth(*m_remainder)
TypeError: _lookup() missing 1 required positional argument: 'sid'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug low-hanging-fruit For issues that the fix is trivial
Projects
None yet
Development

No branches or pull requests

4 participants