Skip to content
Success

Changes

Summary

  1. fix(scripts/pingcap/community): handle 404 error in getFileContent and (commit: 7443efd) (details)
Commit 7443efd016c0eee663553202fd03283cd5d4a082 by noreply
fix(scripts/pingcap/community): handle 404 error in getFileContent and return undefined (#3697)

This pull request improves the robustness of the `getFileContent` method
in `prow-owners-updater.ts` by adding error handling for missing files.
Now, if a requested file does not exist, the method returns `undefined`
instead of throwing an error.

Error handling improvements:

* Updated `getFileContent` in
`scripts/pingcap/community/prow-owners-updater.ts` to catch
`RequestError` exceptions with a 404 status and return `undefined` for
missing files, ensuring smoother handling of absent files.
[[1]](diffhunk://#diff-2ed7e110944d601280252ef0eff96a4f51e0a68610b0799b65db910f8380e31fR154)
[[2]](diffhunk://#diff-2ed7e110944d601280252ef0eff96a4f51e0a68610b0799b65db910f8380e31fR163-R168)
(commit: 7443efd)
The file was modifiedscripts/pingcap/community/prow-owners-updater.ts (diff)