mirror of
https://github.com/xtrll/MusicMetaFinder.git
synced 2026-04-18 00:03:28 +02:00
Removed all files, dependencies, and mentions related to the AuDD API. Cleaned up the src directory, removing all non-developed or unused items, as part of a major cleanup. This change is due to the strategic shift towards using audio fingerprinting for song recognition, as opposed to sending the raw audio file itself.
14 lines
389 B
JavaScript
14 lines
389 B
JavaScript
const errorMessages = {
|
|
NO_DATA: 'No data received',
|
|
NO_RESPONSE: 'No response received',
|
|
SETUP_ERROR: 'Error setting up the request',
|
|
UNKNOWN_ERROR: 'An unknown error occurred',
|
|
};
|
|
|
|
export default function processApiError(error) {
|
|
let errorMessage = errorMessages[error.code] || errorMessages['UNKNOWN_ERROR'];
|
|
|
|
console.error(errorMessage);
|
|
throw new Error(errorMessage);
|
|
}
|