registration_response = {
if (!registration) return { error: "Please enter a valid registration code" };
return fetch(`https://hexdb.io/reg-hex?reg=${registration}`)
.then(response => {
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
return response.text();
})
.catch(error => {
return { error: error.message };
});
}