ÿþ#   L E S S O N S . m d 
 D a t e :   2 0 2 5 - 0 9 - 1 9 
 I s s u e :   T i m e   T r a c k i n g   i n f i n i t e   l o a d i n g 
 
 # #   W h a t   W e n t   W r o n g 
 -   J a v a S c r i p t   f e t c h ( )   d o e s n ' t   i n c l u d e   c o o k i e s   b y   d e f a u l t 
 -   A P I   r e q u i r e s   a u t h e n t i c a t i o n   b u t   f e t c h   w a s n ' t   s e n d i n g   s e s s i o n 
 -   R e s u l t :   3 0 2   r e d i r e c t   t o   l o g i n ,   s p i n n e r   n e v e r   r e s o l v e d 
 
 # #   W h a t   W e   L e a r n e d 
 1 .   A l w a y s   i n c l u d e   c r e d e n t i a l s :   ' s a m e - o r i g i n '   f o r   a u t h e n t i c a t e d   A P I s 
 2 .   C h e c k   n e t w o r k   t a b   i n   b r o w s e r   f o r   3 0 2   r e d i r e c t s 
 3 .   T e s t   A P I   e n d p o i n t s   d i r e c t l y   t o   s e e   a c t u a l   r e s p o n s e 
 
 # #   T i m e   S p e n t 
 -   I n v e s t i g a t i o n :   1 5   m i n u t e s 
 -   R o o t   c a u s e   f o u n d   q u i c k l y   b y   t e s t i n g   e n d p o i n t 
 -   F i x :   2   m i n u t e s 
 
 # #   P r e v e n t i o n 
 -   C r e a t e   a   s t a n d a r d   f e t c h   w r a p p e r   w i t h   a u t h   i n c l u d e d 
 -   A d d   t h i s   t o   d e v e l o p e r   c h e c k l i s t   f o r   n e w   A P I   c a l l s 
 -   C o n s i d e r   u s i n g   a x i o s   w h i c h   h a n d l e s   t h i s   b e t t e r  
 
