Errors are returned in hexadecimal format from the Solana Blockchain, convert to decimal then reference this page to determine the error. If the decimal returned is not a 6XXX number, then the error is a built-in error from the Solana blockchain, reference here to troubleshoot: https://docs.rs/anchor-lang/latest/anchor_lang/error/enum.ErrorCode.html
// Event Name Length too long// 6000NameTooLong// Event has Ended// 6001EventEnded// Contest has Ended// 6002ContestEnded// Invalid Index// 6003InvalidIndex// Event is Full, no more participants can join// 6004EventFull// Contest is Full, no more participants can join// 6005ContestFull// Event Entry Fee Not Paid, must be paid in same transcation as JoinEvent// 6006EventEntryFeeNotPaid// Participant Failed Event Token Gate Validation// 6007EventTokenGateValidationFailed// Contest Entry Fee Not Paid, must be paid in same transcation as JoinContest// 6008ContestEntryFeeNotPaid// Participant Failed Contest Token Gate Validation// 6009ContestTokenGateValidationFailed// Event Not Ended, cannot distribute rewards// 6010EventNotEnded// Event has Already Started, no more participants can join// 6011EventAlreadyStarted// Contest has Already Started, no more participants can join// 6012ContestAlreadyStarted// Contest has not finished, cannot distribute points// 6013ContestNotEnded// Event has been finalized, no more changes allowed// 6014EventFinalized// Contest has been finalized, no more changes allowed// 6015ContestFinalized// Token Gate Check Failed// 6016TokenGateFailed// Insufficient Permissions to Join Contest// 6017InsufficientJoinPermission