Skip to content

Commit

Permalink
Cover IllegalAttachmentFileNameException in GenieExceptionMapperTest
Browse files Browse the repository at this point in the history
  • Loading branch information
bhou committed Apr 30, 2024
1 parent 67a44e5 commit c0421f4
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 c0421f4

Please sign in to comment.