Exceptions with optional fields are failing in Rescript v12

The following snippet works on Rescript v11:

exception NotFound({code: int, message?: string})
raise(NotFound({code: 1, message: "A"}))

But fails in Rescript 12 with:

This has type: option<'a>
  But the record field message is expected to have type: string
  
  message is an optional record field, and you're passing an optional value to it.
  Values passed to an optional record field don't need to be wrapped in an option. You might need to adjust the type of the value supplied.
       
  Possible solutions: 
  - Unwrap the option from the value you're passing in
  - If you really do want to pass the optional value, prepend the value with ? to show you want to pass the option, like: {message: ?}