language-screenshots-VisualEditor/69 failed with MediawikiApi::ApiError: The database has been automatically locked while the slave database servers catch up to the master (readonly). I have thought that f9ebb1f would make that impossible.
rescue MediawikiApi::ApiError => mwerr return 'exists: fileexists-no-change' if mwerr.code == 'fileexists-no-change' return 'exists: fileexists-shared-forbidden' if mwerr.code == 'fileexists-shared-forbidden' return "error: #{mwerr}" ensure
Apparently, I did not test it. 🤦♂️
To test it:
- Run the upload script targeting mediawiki-vagrant. At one point shut down mediawiki-vagrant VM.
- Alternatively, run the script targeting Commons at beta cluster. At one point, introduce an error, like turning of wifi.
The script should report the error, but continue to the next file.