Change edit param to draft
Updated middleware check to use try/catch