Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug callback undefined #31

Merged
merged 1 commit into from Jul 9, 2015
Merged

Fix bug callback undefined #31

merged 1 commit into from Jul 9, 2015

Conversation

lTimeLordl
Copy link
Contributor

No description provided.

@Pierre-Gilles
Copy link
Contributor

Thx ! Ideally, all functions of the Gladys API should begin with callback = callback || function(){};, but sometimes it's not the case. The API should never crash because of these little mistakes, so if you find another functions in "api/services" with this problem, don't hesitate.

Another problem :
Callback response should always begin with an error param :

function test(a, callback){
    ...
    callback(null, 'ok');
} 

test(a, function(err, result){
    if(err) {
        console.log(err);
    }else{

    }
}

But sometimes it's not the case, we should correct that everywhere.

Pierre-Gilles added a commit that referenced this pull request Jul 9, 2015
Fix bug callback undefined
@Pierre-Gilles Pierre-Gilles merged commit 0059859 into GladysAssistant:master Jul 9, 2015
bertrandda pushed a commit to bertrandda/Gladys that referenced this pull request Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants