Skip to content

Instantly share code, notes, and snippets.

View thrix's full-sized avatar

Miroslav Vadkerti thrix

View GitHub Profile
@fgilio
fgilio / axios-catch-error.js
Last active August 15, 2024 01:45
Catch request errors with Axios
/*
* 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 😨
@amitsaha
amitsaha / koji-api
Created November 21, 2012 08:17
Koji API
_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