making GET error proper JSON