Ｉ understand 当 serves as the start of "When xyz, then abc" or "當 。。。时，xyz" but what exactly is 在 doing in this sentence?
Couldn't you just say:
Chinese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Chinese language. It only takes a minute to sign up.Sign up to join this community
It may be a mistake. It should be 当我有错误再帮我纠正就行了 or the complete version 当我有错误的时候再帮我纠正就行了 .
There is no relationship between 再 and 时 . There will always be a 时 in the meaning of this sentence even though you can omit it.
Because of 就行了 ; there will always be a 再 in the meaning of this sentence. After you remove 就行了. 再 makes this sentence sounds like "not now; correct me untill I made a mistake". If you remove 再, this sentence will become a imperative sentence like an order.
I think you should use "再" instead of "在".
They have the same meaning. "【当】我有错误【时】【再】帮我纠正【行了】“, actually you can ignore both "当" and “再”， sometime you can also ignore "时"， like "当我有错误帮我纠正". Just different compositions. "当"，“时”，“再” are some words equivalent to "when" or "if".
In Chinese or other languages, I guess there are always some redundant parts, to ensure the correct meaning is transferred to the destination.
so, if you really want simplicity. "当我错了，纠正我".
if you want to be complex. "当我错了时再纠正我行了“
They have the same meaning but be careful, the feeling is different. A long sentence might mean you are a little bit impatient, especially the "行了" at the end while a short sentence implies order and power.
Presume there's no typo, the only way to interpret this sentence logically is as following.
当我 - pretend I / treat it as I
有错误 - made a mistake
(你)在帮我纠正 - (you) are helping me to correct it
行了 - would be fine
In this case, the function of '在' is as a particle that indicates the verb '帮' is in a continuous state
[当我] [有错误] [(你)在帮我纠正] [(就)行了]。
It would be fine if you just pretend 'I had made a mistake' and you are helping me to correct it.
A: 能替我校对这篇文章吗? - Can you proofread this article for me?
B: 这是你的工作呀! 主编看见了怎辨？ - But this is your job! What if the editor in chief saw it?
A: 当我有错误(你)在帮我纠正(就)行了 - It would be fine if you just pretend 'I had made a mistake' and you are helping me to correct it.
Another way to interpret this sentence is to presume 在 is a typo of 再( like LiBook suggested)