Error message

Added error messages if -1 is sent instead of JSON