"The pattern can never match the type." error from dialyzer

Strange, don’t see anything that might explain your dializer warning.

spec check_rating_to_play seems to either return :ok or indeed an {:error, msg}-tuple.