Skip to content

make return value of projectS3Image non-optional#4792

Open
andrew-nowak wants to merge 1 commit into
mainfrom
an/minor-projection-code-simplification
Open

make return value of projectS3Image non-optional#4792
andrew-nowak wants to merge 1 commit into
mainfrom
an/minor-projection-code-simplification

Conversation

@andrew-nowak

Copy link
Copy Markdown
Member

What does this change?

I noticed that the return type of projectS3ImageById is Future[Option[Image]], but it always returns a Future[Some[Image]] (the branch where an image isn't found instead throws a NoSuchImageExistsInS3). Simplifying that return type to Future[Image] reveals that the controller only gives helpful logging when it receives a None (which as we saw above, it simply can't), so move the logging to the exception handler instead.

How should a reviewer test this change?

How can success be measured?

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

@andrew-nowak andrew-nowak requested a review from a team as a code owner July 6, 2026 11:23
@andrew-nowak andrew-nowak added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Jul 6, 2026
@andrew-nowak andrew-nowak force-pushed the an/minor-projection-code-simplification branch from 78a8756 to ed1ea3a Compare July 6, 2026 11:29
@andrew-nowak andrew-nowak force-pushed the an/minor-projection-code-simplification branch from ed1ea3a to 0b802f1 Compare July 6, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant