mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
bitbake: toaster: libtoaster Add a error handler to GET in makeTypehead
If the JSON data comes back from the request with an error set, have a default handler which logs the error to the console. (Bitbake rev: 9e3f2e2d985a575adb5520d8b517eac5ad6a15ed) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c058c373f6
commit
d5fc4f7f13
@@ -20,6 +20,11 @@ var libtoaster = (function (){
|
||||
source: function(query, process){
|
||||
xhrParams.value = query;
|
||||
$.getJSON(xhrUrl, this.options.xhrParams, function(data){
|
||||
if (data.error != "ok") {
|
||||
console.log("Error getting data from server "+data.error);
|
||||
return;
|
||||
}
|
||||
|
||||
return process (data.list);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user