PG1204 opened a new issue, #6475:
URL: https://github.com/apache/texera/issues/6475

   ### What happened?
   
   ### What happened?
   ComputingUnitAccessResource.getOwner (GET 
/access/computing-unit/owner/{cuid}) throws a plain IllegalArgumentException 
when the unit doesn't exist:
   val unit = workflowComputingUnitDao.fetchOneByCuid(cuid)
   if (unit == null) {
     throw new IllegalArgumentException("Computing unit does not exist")
   }
   
   The service registers no ExceptionMapper for IllegalArgumentException (only 
UnauthorizedExceptionMapper), so it falls through to Dropwizard's default 
LoggingExceptionMapper and surfaces as an opaque HTTP 500 ("There was an error 
processing your request…"), rather than a proper client error.
   
   This is the same unmapped-exception pattern fixed for 
grantAccess/revokeAccess in #6446; getOwner was left out of that PR's scope.
   
   Expected: requesting the owner of a nonexistent cuid returns a 404 
(NotFoundException) with a clear message. Matches the JAX-RS convention now 
used by the other methods in this resource and by 
DatasetAccessResource/WorkflowAccessResource.
   
   
   ### How to reproduce?
   
   With computing-unit sharing enabled, call GET 
/access/computing-unit/owner/{cuid} with a cuid that doesn't exist → HTTP 500 
instead of 404.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   java.lang.IllegalArgumentException: Computing unit does not exist
   => HTTP 500 (default LoggingExceptionMapper)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to