Refactor error handling in commons.rb
Refactor error handling in commons.rb

This should only be called if wiki.rb passes an error with the relevant code, but I'm leaving the guard clause anyway. But this refactor makes it more concise, and also removes the last line uncovered by the spec.

sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,majakomel/WikiEduDashboard,adamwight/WikiEduDashboard,feelfreelinux/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,WinnySilva/WikiEduDashboard,Wowu/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,ragesoss/WikiEduDashboard,MusikAnimal/WikiEduDashboard,feelfreelinux/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,adamwight/WikiEduDashboard,alpha721/WikiEduDashboard,MusikAnimal/WikiEduDashboard,WinnySilva/WikiEduDashboard,majakomel/WikiEduDashboard,MusikAnimal/WikiEduDashboard,WinnySilva/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,ragesoss/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,ragesoss/WikiEduDashboard,feelfreelinux/WikiEduDashboard,majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,adamwight/WikiEduDashboard,KarmaHater/WikiEduDashboard