Skip to content

Handle Reva REST API call status codes correctly.  #56

@MahdiBaghbani

Description

@MahdiBaghbani

Currently we don't check the status codes of calling the Reva APIs, example:

public function generateTokenFromReva(string $userId, string $recipient)
{
// TODO: @Mahdi: handle failures in this request.
$tokenFromReva = $this->revaGet('sciencemesh/generate-invite', $userId, array('recipient' => $recipient));
error_log('Got token from reva!' . $tokenFromReva);
return json_decode($tokenFromReva, true);
}

Proper handling and throwing exceptions / or informing user about problem is required.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions