Custom Hooks Gives 500 Error

I am working with the Gogs version 0.12.1 and can’t get custom hooks to work. I am trying to make a post-receive hook from the web interface and when I click update hook it brings me to a 500 error page and says that custom_hooks/post-receive does not exist. I don’t want to manually create the folder and want the web interface to create the file if it doesn’t exist.