Skip to content

api: errors when clearing a share #83

@bjornars

Description

@bjornars

When clearing a share of a plot, we get an extra HTTP request and some errors. The actual clearing works, but it is a bit noisy.

Python session:

In [13]: p.shared = 'public'

In [14]: p.shared = ''
<Response [405]>
PUT: https://api.novem.io/v1/vis/plots/weather/shared/
body
---
{
  "message": "PUT is not allowed"
}
headers
---
{'Server': 'nginx/1.27.4', 'Date': 'Fri, 04 Apr 2025 17:09:11 GMT', 'Content-Type': 'application/json', 'Content-Length': '37', 'Connection': 'keep-alive', 'Allow': 'GET, OPTIONS', 'X-NS-Size': '37'}
should raise a general error

API logs:

production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:10+00:00] client=31.45.7.91 method=GET request="GET /v1/vis/plots/weather/shared HTTP/1.1" request_length=291 status=404 bytes_sent=548 body_bytes_sent=62 referer=- user_agent="NovemLib/0.5.3 Python/3.12.3" upstream_addr=10.0.3.254:9090 upstream_status=404 request_time=0.051 upstream_response_time=0.051 upstream_connect_time=0.001 upstream_header_time=0.051 request_id=a8ad1ac8-6a09-465a-92cd-7794a943c0a8 username=-
production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:10+00:00] client=31.45.7.91 method=PUT request="PUT /v1/vis/plots/weather/shared/public HTTP/1.1" request_length=317 status=201 bytes_sent=529 body_bytes_sent=85 referer=- user_agent="NovemLib/0.5.3 Python/3.12.3" upstream_addr=10.0.3.254:9090 upstream_status=201 request_time=0.040 upstream_response_time=0.040 upstream_connect_time=0.001 upstream_header_time=0.040 request_id=bf1037eb-8d80-4907-88cb-aab61ed43587 username=-
production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:11+00:00] client=31.45.7.91 method=GET request="GET /v1/vis/plots/weather/shared HTTP/1.1" request_length=291 status=200 bytes_sent=958 body_bytes_sent=477 referer=- user_agent="NovemLib/0.5.3 Python/3.12.3" upstream_addr=10.0.3.254:9090 upstream_status=200 request_time=0.018 upstream_response_time=0.018 upstream_connect_time=0.001 upstream_header_time=0.018 request_id=40f3acaa-bf2f-427d-9f7c-ae11c65db3aa username=-
production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:11+00:00] client=31.45.7.91 method=DELETE request="DELETE /v1/vis/plots/weather/shared/public HTTP/1.1" request_length=320 status=200 bytes_sent=522 body_bytes_sent=84 referer=- user_agent="NovemLib/0.5.3 Python/3.12.3" upstream_addr=10.0.3.254:9090 upstream_status=200 request_time=0.008 upstream_response_time=0.007 upstream_connect_time=0.000 upstream_header_time=0.007 request_id=570d56ec-5e22-4434-b10c-d0b616f17564 username=-
production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:11+00:00] client=31.45.7.91 method=PUT request="PUT /v1/vis/plots/weather/shared/ HTTP/1.1" request_length=311 status=405 bytes_sent=243 body_bytes_sent=37 referer=- user_agent="NovemLib/0.5.3 Python/3.12.3" upstream_addr=10.0.3.254:9090 upstream_status=405 request_time=0.003 upstream_response_time=0.003 upstream_connect_time=0.001 upstream_header_time=0.003 request_id=- username=-
production_api-nginx.0.gm9r1do5rgzz@prod-api    | [2025-04-04T17:09:11+00:00] client=172.232.148.98 method=GET request="GET /v1 HTTP/2.0" request_length=38 status=200 bytes_sent=2774 body_bytes_sent=2439 referer=- user_agent="Blackbox Exporter/0.25.0" upstream_addr=10.0.3.254:9090 upstream_status=200 request_time=0.009 upstream_response_time=0.009 upstream_connect_time=0.001 upstream_header_time=0.009 request_id=b59bc1f8-9497-4b92-a7bb-e90bd755b9b1 username=-

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions