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

Sciencemesh shows success even if status code is not 200 #207

Open
mrvahedi68 opened this issue Jun 6, 2023 · 0 comments
Open

Sciencemesh shows success even if status code is not 200 #207

mrvahedi68 opened this issue Jun 6, 2023 · 0 comments

Comments

@mrvahedi68
Copy link

This API returns 200 when we have 500 from reva.

https://nc2.docker/index.php/apps/sciencemesh/contacts/accept

NC2 error log:

[Tue Jun 06 05:31:36.089285 2023] [php:notice] [pid 32] [client 172.18.0.8:55980] curl output:'{\n "code": "SERVER_ERROR",\n "message": "unexpected error: internal error: {\\\\n \\\\"code\\\\": \\\\"SERVER_ERROR\\\\",\\\\n \\\\"message\\\\": \\\\"unexpected error: error getting user\\\\"\\\\n}"\n}' info: array (\n 'url' => 'https://revanc2.docker/sciencemesh/accept-invite',\n 'content_type' => 'application/json',\n 'http_code' => 500,\n 'header_size' => 709,\n 'request_size' => 204,\n 'filetime' => -1,\n 'ssl_verify_result' => 0,\n 'redirect_count' => 0,\n 'total_time' => 0.366205,\n 'namelookup_time' => 0.000498,\n 'connect_time' => 0.000645,\n 'pretransfer_time' => 0.038695,\n 'size_upload' => 95.0,\n 'size_download' => 171.0,\n 'speed_download' => 466.0,\n 'speed_upload' => 259.0,\n 'download_content_length' => 171.0,\n 'upload_content_length' => 95.0,\n 'starttransfer_time' => 0.038778,\n 'redirect_time' => 0.0,\n 'redirect_url' => '',\n 'primary_ip' => '172.18.0.4',\n 'certinfo' => \n array (\n ),\n 'primary_port' => 443,\n 'local_ip' => '172.18.0.2',\n 'local_port' => 42556,\n 'http_version' => 3,\n 'protocol' => 2,\n 'ssl_verifyresult' => 0,\n 'scheme' => 'HTTPS',\n 'appconnect_time_us' => 38579,\n 'connect_time_us' => 645,\n 'namelookup_time_us' => 498,\n 'pretransfer_time_us' => 38695,\n 'redirect_time_us' => 0,\n 'starttransfer_time_us' => 38778,\n 'total_time_us' => 366205,\n)

RevaNC2 log:

unexpected error: internal error: { "code": "SERVER_ERROR", "message": "unexpected error: error getting user" } error="internal error: {\n \"code\": \"SERVER_ERROR\",\n \"message\": \"unexpected error: error getting user\"\n}" pid=27 pkg=rhttp traceid=d4c5a7d0afb38e071f972ff33db0e7f6

Reproduce:
change the flowing line in reva to skip if and fire else in revaNC1 and rebuild the reva.

https://github.com/pondersource/reva/blob/6e627b4eb9424211af613b5d732a9f3b577e38fd/internal/grpc/services/userprovider/userprovider.go#L131-L132

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

No branches or pull requests

1 participant