Add comment about response catching strictness levels.
This commit is contained in:
		
							parent
							
								
									b73fb69612
								
							
						
					
					
						commit
						89195d3449
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -76,6 +76,12 @@ function _request(method, url, callback) | |||
|         } | ||||
|         "data": {JSON parsed from server response if json_ok}. | ||||
|     } | ||||
| 
 | ||||
|     So, from most lenient to most strict, error catching might look like: | ||||
|     if response.meta.completed | ||||
|     if response.meta.json_ok | ||||
|     if response.meta.status === 200 | ||||
|     if response.meta.status === 200 and response.meta.json_ok | ||||
|     */ | ||||
|     const request = new XMLHttpRequest(); | ||||
|     const response = { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue