making old tests pass
authorNico Cesar <nico@nicocesar.com>
Mon, 30 Nov 2020 17:01:21 +0000 (12:01 -0500)
committerNico Cesar <nico@nicocesar.com>
Mon, 30 Nov 2020 17:01:21 +0000 (12:01 -0500)
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico@curii.com>

lib/controller/federation/conn.go

index 446e3893d1b6841e2ead81a8ef9c1edfd9ef23f5..7cbf4f8eb140e3c55ecba4a88bede436f9d90359 100644 (file)
@@ -352,7 +352,9 @@ func (conn *Conn) ContainerRequestCreate(ctx context.Context, options arvados.Cr
                        // This should probably be StatusUnauthorized
                        // (need to update test in
                        // lib/controller/federation_test.go):
-                       return arvados.ContainerRequest{}, httpErrorf(http.StatusForbidden, "%w", err)
+                       // When RoR is out of the picture this should be:
+                       // return arvados.ContainerRequest{}, httpErrorf(http.StatusUnauthorized, "%w", err)
+                       return arvados.ContainerRequest{}, httpErrorf(http.StatusForbidden, "%s", "invalid API token")
                }
                user, err := conn.local.UserGetCurrent(ctx, arvados.GetOptions{})
                if err != nil {