Fix a 500 error if the user submits an invalid period
Fix a 500 error if the user submits an invalid period

Change-Id: I487f3fadf74120fff23d500234f959e893552276

openstack/monasca-api,sapcc/monasca-api,stackforge/monasca-api,openstack/monasca-api,stackforge/monasca-api,sapcc/monasca-api,stackforge/monasca-api,sapcc/monasca-api,stackforge/monasca-api,openstack/monasca-api