eleven-solutions-common-website-unique-web 21.0.34 → 21.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
| 
         @@ -168,6 +168,7 @@ const TaxonomyForm = ({ url }) => { 
     | 
|
| 
       168 
168 
     | 
    
         
             
                    setIsAddingSubType(true);
         
     | 
| 
       169 
169 
     | 
    
         
             
                };
         
     | 
| 
       170 
170 
     | 
    
         
             
                const handleSubTypeSubmitClick = () => __awaiter(void 0, void 0, void 0, function* () {
         
     | 
| 
      
 171 
     | 
    
         
            +
                    var _a;
         
     | 
| 
       171 
172 
     | 
    
         
             
                    if (!subCode || !subValue) {
         
     | 
| 
       172 
173 
     | 
    
         
             
                        alert("Please fill out both Code and Value fields before proceeding.");
         
     | 
| 
       173 
174 
     | 
    
         
             
                        return;
         
     | 
| 
         @@ -187,8 +188,16 @@ const TaxonomyForm = ({ url }) => { 
     | 
|
| 
       187 
188 
     | 
    
         
             
                        }
         
     | 
| 
       188 
189 
     | 
    
         
             
                    }
         
     | 
| 
       189 
190 
     | 
    
         
             
                    catch (error) {
         
     | 
| 
       190 
     | 
    
         
            -
                         
     | 
| 
       191 
     | 
    
         
            -
                         
     | 
| 
      
 191 
     | 
    
         
            +
                        // Extract additional details if available
         
     | 
| 
      
 192 
     | 
    
         
            +
                        const errorMessage = error.message || "An unknown error occurred";
         
     | 
| 
      
 193 
     | 
    
         
            +
                        const innerException = error.innerException || ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error.details || "";
         
     | 
| 
      
 194 
     | 
    
         
            +
                        // Combine the main message with additional details
         
     | 
| 
      
 195 
     | 
    
         
            +
                        const detailedMessage = innerException
         
     | 
| 
      
 196 
     | 
    
         
            +
                            ? `${errorMessage}\n\nDetails: ${JSON.stringify(innerException, null, 2)}`
         
     | 
| 
      
 197 
     | 
    
         
            +
                            : errorMessage;
         
     | 
| 
      
 198 
     | 
    
         
            +
                        // Display the detailed error message in an alert
         
     | 
| 
      
 199 
     | 
    
         
            +
                        alert("Error while adding SubType: " + detailedMessage);
         
     | 
| 
      
 200 
     | 
    
         
            +
                        console.error("Error details:", error); // Log full error for debugging
         
     | 
| 
       192 
201 
     | 
    
         
             
                    }
         
     | 
| 
       193 
202 
     | 
    
         
             
                    setIsModalOpen(false);
         
     | 
| 
       194 
203 
     | 
    
         
             
                    setSubCode("");
         
     | 
    
        package/package.json
    CHANGED
    
    
| 
         @@ -248,12 +248,25 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => { 
     | 
|
| 
       248 
248 
     | 
    
         
             
                  if (fetchedTaxonomies && Array.isArray(fetchedTaxonomies)) {
         
     | 
| 
       249 
249 
     | 
    
         
             
                    setAllTaxonomies(fetchedTaxonomies);
         
     | 
| 
       250 
250 
     | 
    
         
             
                  }
         
     | 
| 
       251 
     | 
    
         
            -
                } catch (error) {
         
     | 
| 
       252 
     | 
    
         
            -
                   
     | 
| 
       253 
     | 
    
         
            -
             
     | 
| 
       254 
     | 
    
         
            -
             
     | 
| 
       255 
     | 
    
         
            -
             
     | 
| 
       256 
     | 
    
         
            -
             
     | 
| 
      
 251 
     | 
    
         
            +
                } catch (error: any) {
         
     | 
| 
      
 252 
     | 
    
         
            +
                  // Extract additional details if available
         
     | 
| 
      
 253 
     | 
    
         
            +
                  const errorMessage = error.message || "An unknown error occurred";
         
     | 
| 
      
 254 
     | 
    
         
            +
                  const innerException =
         
     | 
| 
      
 255 
     | 
    
         
            +
                    error.innerException || error.response?.data || error.details || "";
         
     | 
| 
      
 256 
     | 
    
         
            +
             
     | 
| 
      
 257 
     | 
    
         
            +
                  // Combine the main message with additional details
         
     | 
| 
      
 258 
     | 
    
         
            +
                  const detailedMessage = innerException
         
     | 
| 
      
 259 
     | 
    
         
            +
                    ? `${errorMessage}\n\nDetails: ${JSON.stringify(
         
     | 
| 
      
 260 
     | 
    
         
            +
                        innerException,
         
     | 
| 
      
 261 
     | 
    
         
            +
                        null,
         
     | 
| 
      
 262 
     | 
    
         
            +
                        2
         
     | 
| 
      
 263 
     | 
    
         
            +
                      )}`
         
     | 
| 
      
 264 
     | 
    
         
            +
                    : errorMessage;
         
     | 
| 
      
 265 
     | 
    
         
            +
             
     | 
| 
      
 266 
     | 
    
         
            +
                  // Display the detailed error message in an alert
         
     | 
| 
      
 267 
     | 
    
         
            +
                  alert("Error while adding SubType: " + detailedMessage);
         
     | 
| 
      
 268 
     | 
    
         
            +
             
     | 
| 
      
 269 
     | 
    
         
            +
                  console.error("Error details:", error); // Log full error for debugging
         
     | 
| 
       257 
270 
     | 
    
         
             
                }
         
     | 
| 
       258 
271 
     | 
    
         | 
| 
       259 
272 
     | 
    
         
             
                setIsModalOpen(false);
         
     |