Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http/500 when package is not part of release #40

Open
al4 opened this issue Aug 9, 2016 · 0 comments
Open

http/500 when package is not part of release #40

al4 opened this issue Aug 9, 2016 · 0 comments
Labels

Comments

@al4
Copy link
Collaborator

al4 commented Aug 9, 2016

Should be a useful error message rather than 500

[2016-08-09 16:16:31 +0000] [2642] [ERROR] Error handling request /releases/9a063e34-03f5-4b9a-991a-4e5278468a94/packages/bfb0-4eec-860e-bd211c62ccc9/stop
Traceback (most recent call last):
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/orlo/user_auth.py", line 42, in wrapped
    return func(*args, **kwargs)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/orlo/route_releases.py", line 249, in post_packages_stop
    package = fetch_package(release_id, package_id)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/orlo/util.py", line 95, in fetch_package
    package = pq.first()
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2659, in first
    ret = list(self[0:1])
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__
    return list(res)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
    return self._execute_and_instances(context)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1078, in _execute_context
    None, None)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1073, in _execute_context
    context = constructor(dialect, self, conn, *args)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 600, in _init_compiled
    for key in compiled_params
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 600, in <genexpr>
    for key in compiled_params
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy/sql/type_api.py", line 978, in process
    return impl_processor(process_param(value, dialect))
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy_utils/types/uuid.py", line 64, in process_bind_param
    value = self._coerce(value)
  File "/usr/share/python/orlo/local/lib/python2.7/site-packages/sqlalchemy_utils/types/uuid.py", line 55, in _coerce
    value = uuid.UUID(bytes=value)
  File "/usr/lib/python2.7/uuid.py", line 144, in __init__
    raise ValueError('bytes is not a 16-char string')
StatementError: (exceptions.ValueError) bytes is not a 16-char string [SQL: u'SELECT package.id AS package_id, package.name AS package_name, package.stime AS package_stime, package.ftime AS package_ftime, package.duration AS package_duration, package.status AS package_status, package.version AS package_version, package.diff_url AS package_diff_url, package.rollback AS package_rollback, package.release_id AS package_release_id \nFROM package \nWHERE package.id = %(id_1)s \n LIMIT %(param_1)s'] [parameters: [immutabledict({})]]
@al4 al4 added the bug label Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant