Skip to content

Commit

Permalink
Cover IllegalAttachmentFileNameException in GenieExceptionMapperTest (N…
Browse files Browse the repository at this point in the history
…etflix#1213)

Co-authored-by: bhou <bhou@netflix.com>
  • Loading branch information
2 people authored and app committed May 20, 2024
1 parent 72b906b commit 3acceb7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException;
import com.netflix.genie.web.exceptions.checked.AttachmentTooLargeException;
import com.netflix.genie.web.exceptions.checked.IdAlreadyExistsException;
import com.netflix.genie.web.exceptions.checked.IllegalAttachmentFileNameException;
import com.netflix.genie.web.exceptions.checked.JobNotFoundException;
import com.netflix.genie.web.exceptions.checked.NotFoundException;
import com.netflix.genie.web.exceptions.checked.PreconditionFailedException;
Expand Down Expand Up @@ -232,6 +233,7 @@ void canHandleGenieCheckedExceptions() {
exceptions.put(new JobNotFoundException(), HttpStatus.NOT_FOUND);
exceptions.put(new NotFoundException(), HttpStatus.NOT_FOUND);
exceptions.put(new PreconditionFailedException(), HttpStatus.BAD_REQUEST);
exceptions.put(new IllegalAttachmentFileNameException(), HttpStatus.BAD_REQUEST);
exceptions.put(new AttachmentTooLargeException(), HttpStatus.PAYLOAD_TOO_LARGE);

for (final Map.Entry<GenieCheckedException, HttpStatus> exception : exceptions.entrySet()) {
Expand Down

0 comments on commit 3acceb7

Please sign in to comment.