36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# common server code for koji
|
|
#
|
|
# Copyright (c) 2012-2014 Red Hat, Inc.
|
|
#
|
|
# Koji is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation;
|
|
# version 2.1 of the License.
|
|
#
|
|
# This software is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this software; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
#
|
|
# Authors:
|
|
# Mike McLean <mikem@redhat.com>
|
|
|
|
|
|
class ServerError(Exception):
|
|
"""Base class for our server-side-only exceptions"""
|
|
|
|
|
|
class ServerRedirect(ServerError):
|
|
"""Used to handle redirects"""
|
|
|
|
|
|
class BadRequest(ServerError):
|
|
"""Used to trigger an http 400 error"""
|
|
|
|
|
|
class RequestTimeout(ServerError):
|
|
"""Used to trigger an http 408 error"""
|