Return HTTP 400 when creating Project with nonexistent user

[?]
Apr 26, 2021, 6:28 PM
X7P27PO3YH5W65FE3MG4W63VEBFQK2ULNMARK4BDVSWY3MQK4ZLAC

Dependencies

  • [2] TNIHMBCR Jobset.pm: Factor out build->eval mapping.
  • [3] JO75HQLO Add a restart-jobs role
  • [4] LX326CB7 Add hydra OpenAPI description (#750)
  • [5] MNKXBLNC Return 410 Gone (rather than 500) if an output is no longer available
  • [6] LZVO64YG Merge in the first bits of the API work
  • [7] H66SHOS7 Fix and clean up editing project settings
  • [8] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [9] LYVUXIGT Clean up the authorization code a bit
  • [10] CS7T2XFI
  • [11] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [12] SSMN5MPT Remove dead code
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] 5NO7NCKT * Refactoring.

Change contents

  • edit in hydra-api.yaml at line 173
    [4.5257]
    [4.5257]
    '400':
    description: bad request
    content:
    application/json:
    schema:
    type: object
    properties:
    error:
    description: error message
    type: string
  • replacement in src/lib/Hydra/Controller/Project.pm at line 138
    [5.20412][5.660:724]()
    error($c, "The user name ‘$owner’ does not exist.")
    [5.20412]
    [5.724]
    badRequest($c, "The user name ‘$owner’ does not exist.")
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 14
    [2.528][5.331:368](),[5.70][5.331:368]()
    error notFound gone accessDenied
    [2.528]
    [3.63]
    error notFound gone accessDenied badRequest
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 158
    [15.4357]
    [15.4357]
    sub badRequest {
    my ($c, $msg) = @_;
    error($c, $msg, 400);
    }