improve error handling of a missing SECRET