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

Fixes #209

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Fixes #209

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

## V103.0.1-dev
### Added
- API: Allow commas for float fields [#205](https://github.com/cartoway/planner-web/pull/205)
- API:
- Allow commas for float fields [#205](https://github.com/cartoway/planner-web/pull/205)
- Capture sentry from API [#209](https://github.com/cartoway/planner-web/pull/209)
- Planning: Add router name to vehicle selector [#202](https://github.com/cartoway/planner-web/pull/202)
- Destination: Allow commas for float columns during import [#203](https://github.com/cartoway/planner-web/pull/203) & [#208](https://github.com/cartoway/planner-web/pull/208)
- Device: Set a 2s timeout for StgTelematics[#209](https://github.com/cartoway/planner-web/pull/209)
- Zoning:
- Simplify polygons geometries [#207](https://github.com/cartoway/planner-web/pull/207)
- Destroy unconsistent polygons [#210](https://github.com/cartoway/planner-web/pull/210)
Expand Down
1 change: 1 addition & 0 deletions app/api/v01/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def error!(*args)
response[:message] = messages.join(' ')
error!(response.merge(status: 409), 409, e.backtrace)
else
Sentry.capture_exception(e)
error!(response.merge(status: 500), 500, e.backtrace)
end
end
Expand Down
1 change: 1 addition & 0 deletions app/api/v100/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def error!(*args)
response[:message] = messages.join(' ')
error!(response.merge(status: 409), 409, e.backtrace)
else
Sentry.capture_exception(e)
error!(response.merge(status: 500), 500, e.backtrace)
end
end
Expand Down
4 changes: 3 additions & 1 deletion lib/devices/stg_telematics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def rest_client_with_method(url, token, params, method = :post)
method: method,
url: url,
headers: { content_type: :json, accept: :json, 'auth-code': token }.delete_if{ |_k, v| v.nil? },
payload: params.to_json
payload: params.to_json,
open_timeout: 2,
read_timeout: 2
)
rescue RestClient::RequestTimeout
raise DeviceServiceError.new("#{I18n.t('errors.stg_telemativs.timeout')}")
Expand Down
Loading