Summary
First, added begin to team.rb, line 73, and surrounded the places where errors are likely to occur with begin.
Next, added rescue to line 79 and add the processing of the place where the error occurred in rescue.
Result
You can now post without error even if the ID does not exist.
Summary First, added begin to team.rb, line 73, and surrounded the places where errors are likely to occur with begin. Next, added rescue to line 79 and add the processing of the place where the error occurred in rescue.
Result You can now post without error even if the ID does not exist.