blob: ab4cd4881c9bb757364bf691ef8a06226abb4e89 [file] [log] [blame]
Alex Kleinb7cdbe62019-02-22 11:41:32 -07001# -*- coding: utf-8 -*-
2# Copyright 2019 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
Mike Frysingera9b30c72020-04-18 03:36:03 -04006from __future__ import print_function
7
8import sys
9
10
11assert sys.version_info >= (3, 6), 'This module requires Python 3.6+'
12
13
Alex Kleinb7cdbe62019-02-22 11:41:32 -070014IMPORT_PATTERN = 'chromite.api.controller.%s'
Alex Klein8cb365a2019-05-15 16:24:53 -060015
16# Endpoint ran successfully.
17RETURN_CODE_SUCCESS = 0
18# Unrecoverable error. This includes things from missing required inputs to
19# unhandled exceptions.
20RETURN_CODE_UNRECOVERABLE = 1
21# The endpoint did not complete successfully, but did complete via a well
22# handled path and produced actionable information relevant to the failure in
23# the response.
24RETURN_CODE_UNSUCCESSFUL_RESPONSE_AVAILABLE = 2
25# Notes the endpoint completed via a well handled path, but the result was not
26# a successful execution of the endpoint.
27RETURN_CODE_COMPLETED_UNSUCCESSFULLY = 3
Alex Klein231d2da2019-07-22 16:44:45 -060028
29
30# Validate only request successfully validated.
31RETURN_CODE_VALID_INPUT = 0
32# Validate only request did not pass validation.
33RETURN_CODE_INVALID_INPUT = 1