@app.route('/scans/<int:scan_id>/exceptions/', methods=['GET'])
@requires_auth
def list_exceptions(scan_id):
 scan_info = get_scan_info_from_id(scan_id)
 if (scan_info is None):
  abort(404, 'Scan not found')
 data = []
 all_exceptions = scan_info.w3af_core.exception_handler.get_all_exceptions()
 for (exception_id, exception_data) in enumerate(all_exceptions):
  data.append(exception_to_json(exception_data, scan_id, exception_id))
 return jsonify({'items': data})

@ app . route ( '/scans/<int:scan_id>/exceptions/' , methods = [ 'GET' ] ) @ requires_auth def list_exceptions ( scan_id ) : scan_info = get_scan_info_from_id ( scan_id ) if ( scan_info is None ) : abort ( 404 , 'Scan not found' ) data = [ ] all_exceptions = scan_info . w3af_core . exception_handler . get_all_exceptions ( ) for ( exception_id , exception_data ) in enumerate ( all_exceptions ) : data . append ( exception_to_json ( exception_data , scan_id , exception_id ) ) return jsonify ( { 'items' : data } )
list all exceptions found during a scan :return: a json containing a list of: - exception resource url - the exceptions id - exception string - exception file name - exception line number .