apavlidi / IT_API

The Internet services of the IT department of Alexander Technological Education Institute of Thessaloniki
http://api.it.teithe.gr/
MIT License
14 stars 5 forks source link

GET Requests #51

Closed iamraf closed 5 years ago

iamraf commented 5 years ago

GET Requests should return 401 when access token expired instead of 400.

Access token error: {"error":{"message":"An active access token required to complete this action.","type":"TokenInvalidError","code":400}}

apavlidi commented 5 years ago

@h01d Thanks for your feedback on this. Its an easy fix so I`ll annotate with good first issue for newcomers.

iamaldi commented 5 years ago

@apavlidi Can you verify that the following chunk of code is responsible for the issue being reported? https://github.com/apavlidi/IT_API/blob/5ec795c5613a5cb9464e048a797379ac585f4e8d/configs/auth.js#L53-L68

EDIT: Currently looking forward to contribute in this repository.

apavlidi commented 5 years ago

@iamaldi Yes this is it. There is also an issue here #14 that refers to similar problem where we should return err.code instead of code: err.httpCode. Happy to hear you are interested in contributing 👍