mqp review: Use console.error if !response.ok
This commit is contained in:
		
							parent
							
								
									89936ed8b1
								
							
						
					
					
						commit
						48d77d208e
					
				|  | @ -35,9 +35,12 @@ export const updateMetrics = functions.pubsub | |||
|       }, | ||||
|       method: 'POST', | ||||
|       body: JSON.stringify({}), | ||||
|     }).then((res) => res.json()) | ||||
|     }) | ||||
| 
 | ||||
|     console.log(await response) | ||||
|     const json = await response.json() | ||||
| 
 | ||||
|     if (response.ok) console.log(json) | ||||
|     else console.error(json) | ||||
|   }) | ||||
| 
 | ||||
| export const updatemetrics = newEndpointNoAuth( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user