Rest API - Rate Limiting and Throttling
Consider this pseudocode for a REST API endpoint:
What will
function getUserData() {
try {
return fetchUserFromDB();
} catch (error) {
return { name: "Guest", id: 0 };
}
}What will
getUserData() return if the database fetch fails?