PlaceOS/staff-api

2109.0 Create Event from latest workplace app results in 500

Closed this issue · 2 comments

w-le commented

POST payload is private and has been sent to steve

staff-api container error is below:

level=[I] time=2021-09-10T06:38:13Z program=StaffAPI source=action-controller calendar_size=1 client_ip=10.240.0.5 request_id=4ab1e66f-f627-486e-b459-7a4157448944 domain=smarthq.ashrae.org tenant_id=1 event=response method=GET path=/api/staff/v1/events?period_start=1631203200&period_end=1631807999 status=200 duration=231.25ms
level=[I] time=2021-09-10T06:38:15Z program=StaffAPI source=action-controller client_ip=10.240.0.5 request_id=18405c6a-59da-4924-b3c1-0acf97a33f06 domain=smarthq.ashrae.org tenant_id=1 event=response method=GET path=/api/staff/v1/bookings?period_start=1631203200&period_end=1631807999&type=desk status=200 duration=23.08ms
level=[W] time=2021-09-10T06:38:15Z program=StaffAPI source=StaffAPI.controller message="error fetching events for <user@email>" calendar_size=1 client_ip=10.240.0.5 request_id=9aaec6be-b476-438f-a37b-3768056445e5 domain=smarthq.ashrae.org tenant_id=1
level=[E] time=2021-09-10T06:28:07Z program=StaffAPI source=action-controller client_ip=10.240.0.5 request_id=d0430076-b49f-4b7f-9328-ff7ba3db6f20 domain=smarthq.ashrae.org tenant_id=1 event=error method=POST path=/api/staff/v1/events status=500 duration=3.61s
Missing JSON attribute: conferenceId
  parsing Office365::OnlineMeeting at line 1, column 4480
  parsing Office365::Event#onlineMeeting at line 1, column 4464 (JSON::SerializableError)
  from usr/share/crystal/src/json/serialization.cr:159:7 in 'initialize:__pull_for_json_serializable'
  from app/lib/place_calendar/src/office365.cr:133:7 in 'create'
  from usr/share/crystal/src/int.cr:1207:11 in '???'
  from usr/share/crystal/src/primitives.cr:266:3 in 'call'
  from usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
  from usr/share/crystal/src/http/server.cr:500:5 in '->'
  from usr/share/crystal/src/primitives.cr:266:3 in 'run'
  from ???
Caused by: Missing JSON attribute: conferenceId
  parsing Office365::OnlineMeeting at line 1, column 4480 (JSON::SerializableError)
  from usr/share/crystal/src/json/serialization.cr:159:7 in 'initialize:__pull_for_json_serializable'
  from app/lib/place_calendar/src/office365.cr:133:7 in 'create'
  from usr/share/crystal/src/int.cr:1207:11 in '???'
  from usr/share/crystal/src/primitives.cr:266:3 in 'call'
  from usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from usr/share/crystal/src/http/server/handler.cr:28:7 in 'call'
  from usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'
  from usr/share/crystal/src/http/server.cr:500:5 in '->'
  from usr/share/crystal/src/primitives.cr:266:3 in 'run'
  from ???
2021-09-10T06:28:07.258385258Z

fixed in 35f6bf8

w-le commented

tested ok with a basic event creation from workplace app