Skip to content

Commit

Permalink
Return etag when getting issue that doesn’t exist
Browse files Browse the repository at this point in the history
Fixes #23648
  • Loading branch information
vboctor committed Nov 25, 2017
1 parent cb2a453 commit d7ec37d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/rest/restcore/issues_rest.php
Expand Up @@ -70,6 +70,11 @@ function rest_issue_get( \Slim\Http\Request $p_request, \Slim\Http\Response $p_r
}
}

if( !bug_exists( $t_issue_id ) ) {
return $p_response->withStatus( HTTP_STATUS_NOT_FOUND, 'Issue not found' )
->withHeader( HEADER_ETAG, $t_etag );
}

# Username and password below are ignored, since middleware already done the auth.
$t_issue = mc_issue_get( /* username */ '', /* password */ '', $t_issue_id );

Expand Down

0 comments on commit d7ec37d

Please sign in to comment.