This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_listapi() | |
addExternalRPM(rpminfo, external_repo, strict=True) | |
description: Import an external RPM | |
This call is mainly for testing. Normal access will be through | |
a host call | |
addExternalRepoToTag(tag_info, repo_info, priority) | |
description: Add an external repo to a tag | |
addGroupMember(group, user, strict=True) | |
description: Add user to group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |