Sha256: 04d79c03e80d33ce10491234ea51ddc4058a2404516d9d7fdf25aa63bd40a151
Contents?: true
Size: 744 Bytes
Versions: 19
Compression:
Stored size: 744 Bytes
Contents
module ForestLiana module Ability module Fetch def get_permissions(route) begin response = ForestLiana::ForestApiRequester.get(route) if response.is_a?(Net::HTTPOK) JSON.parse(response.body) else raise "Forest API returned an #{ForestLiana::Errors::HTTPErrorHelper.format(response)}" end rescue => exception FOREST_REPORTER.report exception FOREST_LOGGER.error 'Cannot retrieve the permissions from the Forest server.' FOREST_LOGGER.error 'Which was caused by:' ForestLiana::Errors::ExceptionHelper.recursively_print(exception, margin: ' ', is_error: true) nil end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems