If we want to handle this case, I think a better error message would be `{invalid_s3_url, undefined}` because in this case, the config would not be missing, but the user would have managed to set `'undefined'` as the value. Seems a bit defensive, I think it would be OK to crash with bad match or perhaps do a more general check if we we're going to be defensive:
```
case ... of
    undefined -> 
    {ok, host_header} ->
    {ok, Url} when is_list(Url) ->
    {ok, Bad} -> invalid, Bad
    
```
I'd be fine with just removing the {ok, undefined} clause, but if we want to be extra defensive here, then I'm arguing that we should attempt to cover more ground for the possible invalid values. Make sense?