Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More code tidying

* Added comments/sections/etc. General tidying.
  • Loading branch information...
commit 9708e10bbb12a205580c65dea374544e5b071434 1 parent b053b9c
@OJ authored
View
50 apps/csd_core/src/csd_core.erl
@@ -1,39 +1,47 @@
-%% @author OJ Reeves <oj@buffered.io>
-%% @copyright 2011 OJ Reeves
-
-%% @doc csd_core startup code
-
-module(csd_core).
-author('OJ Reeves <oj@buffered.io>').
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([start/0, start_link/0, stop/0]).
-ensure_started(App) ->
- case application:start(App) of
- ok ->
- ok;
- {error, {already_started, App}} ->
- ok
- end.
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
%% @spec start_link() -> {ok,Pid::pid()}
%% @doc Starts the app for inclusion in a supervisor tree
start_link() ->
- start_common(),
- pooler_sup:start_link().
+ start_common(),
+ pooler_sup:start_link().
%% @spec start() -> ok
%% @doc Start the csd_core server.
start() ->
- start_common(),
- ensure_started(pooler).
+ start_common(),
+ ensure_started(pooler).
%% @spec stop() -> ok
%% @doc Stop the csd_core server.
stop() ->
- application:stop(pooler),
- application:stop(crypto),
- ok.
+ application:stop(pooler),
+ application:stop(crypto),
+ ok.
+
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
-%% @private
start_common() ->
- ensure_started(crypto).
+ ensure_started(crypto).
+
+ensure_started(App) ->
+ case application:start(App) of
+ ok ->
+ ok;
+ {error, {already_started, App}} ->
+ ok
+ end.
+
View
13 apps/csd_core/src/csd_core_app.erl
@@ -1,16 +1,21 @@
-module(csd_core_app).
+-author('OJ Reeves <oj@buffered.io>').
-behaviour(application).
-%% Application callbacks
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([start/2, stop/1]).
-%% ===================================================================
-%% Application callbacks
-%% ===================================================================
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
start(_StartType, _StartArgs) ->
pooler:start_link().
stop(_State) ->
ok.
+
View
8 apps/csd_core/src/csd_date.erl
@@ -1,8 +1,16 @@
-module(csd_date).
-author('OJ Reeves <oj@buffered.io>').
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([utc_now/0]).
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
utc_now() ->
Now = {_, _, Micro} = erlang:now(),
{{Y, M, D}, {H, MM, S}} = calendar:now_to_universal_time(Now),
View
15 apps/csd_core/src/csd_json.erl
@@ -1,6 +1,16 @@
-module(csd_json).
+-author('OJ Reeves <oj@buffered.io>').
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([from_json/1, from_json/2, to_json/1, to_json/2]).
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
to_json(PropList) ->
to_json(PropList, fun(_) -> true end).
@@ -13,6 +23,10 @@ from_json(Json) ->
from_json(Json, IsStrFun) ->
to_proplist(mochijson2:decode(Json), IsStrFun).
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
+
from_proplist(List=[H|_], IsStrFun) when is_tuple(H) ->
{ struct, lists:map(fun(P) -> from_proplist(P, IsStrFun) end, List) };
from_proplist({PropName, ComplexProp=[H|_]}, IsStrFun) when is_tuple(H) ->
@@ -47,3 +61,4 @@ from_value(PropName, B, IsStrFun) when is_binary(B) ->
end;
from_value(_, V, _) ->
V.
+
View
17 apps/csd_core/src/csd_snippet_store.erl
@@ -1,13 +1,21 @@
-module(csd_snippet_store).
-author('OJ Reeves <oj@buffered.io>').
--export([save/2, fetch/2, list_for_user/2]).
-
-define(BUCKET, <<"snippet">>).
-define(USERID_INDEX, "userid").
-define(LIST_MAP_JS, <<"function(v){var d = Riak.mapValuesJson(v)[0]; return [{key:d.key,title:d.title,created:d.created}];}">>).
-define(REDUCE_SORT_JS, <<"function(a,b){return a.created<b.created?1:(a.created>b.created?-1:0);}">>).
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([save/2, fetch/2, list_for_user/2]).
+
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
fetch(RiakPid, Key) ->
case csd_riak:fetch(RiakPid, ?BUCKET, Key) of
{ok, RiakObj} ->
@@ -40,8 +48,13 @@ list_for_user(RiakPid, UserId) ->
end,
{ok, Result}.
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
+
persist(RiakPid, RiakObj, Snippet) ->
UserId = csd_snippet:get_user_id(Snippet),
UpdatedRiakObj = csd_riak:set_index(RiakObj, int, ?USERID_INDEX, UserId),
ok = csd_riak:save(RiakPid, UpdatedRiakObj),
{ok, Snippet}.
+
View
11 apps/csd_core/src/csd_user_store.erl
@@ -1,9 +1,17 @@
-module(csd_user_store).
-author('OJ Reeves <oj@buffered.io>').
+-define(BUCKET, <<"user">>).
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([fetch/2, save/2]).
--define(BUCKET, <<"user">>).
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
fetch(RiakPid, UserId) when is_integer(UserId) ->
fetch(RiakPid, integer_to_list(UserId));
@@ -34,3 +42,4 @@ save(RiakPid, User) ->
ok = csd_riak:save(RiakPid, NewRiakObj),
{ok, User}
end.
+
View
13 apps/csd_core/src/csd_vote_store.erl
@@ -1,8 +1,6 @@
-module(csd_vote_store).
-author('OJ Reeves <oj@buffered.io>').
--export([fetch/2, save/2, count_for_snippet/2, count_for_snippet/3]).
-
-define(BUCKET, <<"vote">>).
-define(SNIPPET_INDEX, <<"snippetid">>).
-define(USER_INDEX, <<"userid">>).
@@ -11,6 +9,16 @@
-define(COUNT_SNIP_USER_MAP_JS, <<"function(v,k,a){var d=Riak.mapValuesJson(v)[0];var which=d.user_id===a?d.which:\"\";if(d.which===\"left\"){return[[1,0,which]];}return[[0,1,which]];}">>).
-define(COUNT_SNIP_USER_RED_JS, <<"function(vals,arg){if(vals.length===0){return[[0,0,\"\"]];}return[vals.reduce(function(a,v){return[a[0]+v[0],a[1]+v[1],a[2].length>0?a[2]:v[2]];})];}">>).
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([fetch/2, save/2, count_for_snippet/2, count_for_snippet/3]).
+
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
fetch(RiakPid, VoteId) ->
case csd_riak:fetch(RiakPid, ?BUCKET, VoteId) of
{ok, RiakObj} ->
@@ -58,3 +66,4 @@ save(RiakPid, Vote) ->
ok = csd_riak:save(RiakPid, NewRiakObj),
{ok, Vote}
end.
+
View
10 apps/csd_web/src/conf.erl
@@ -1,8 +1,17 @@
-module(conf).
+-author('OJ Reeves <oj@buffered.io>').
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
-export([get_section/1, get_section/2]).
-export([get_val/2, get_val/3]).
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
get_section(Name) ->
get_section(Name, undefined).
@@ -24,3 +33,4 @@ get_val(SectionName, Name, Default) ->
_ ->
Default
end.
+
View
23 apps/csd_web/src/cookie.erl
@@ -1,13 +1,6 @@
-%% @author OJ Reeves <oj@buffered.io>
-%% @copyright 2012 OJ Reeves
-
-module(cookie).
-
-author('OJ Reeves <oj@buffered.io>').
--export([auth_required_json/0]).
--export([load_auth/1, store_auth/5]).
-
-define(AUTH_COOKIE, "__CodeSmackdown_Auth").
-define(AUTH_SALT, "27ed2d041cdb4b8b2702").
-define(AUTH_SECRET, "2d0431cd9bda5ba4b98271edcb2e7102").
@@ -17,6 +10,17 @@
<<110,56,121,28,235,159,77,154,160,5,130,210,204,32,26,224,255,86,101,71,61,3,
66,69,30,39,42,0,116,93,204,99>>).
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([auth_required_json/0]).
+-export([load_auth/1, store_auth/5]).
+
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
auth_required_json() ->
Json = {struct, {"error", "unauthorized"}},
mochijson2:encode(Json).
@@ -41,6 +45,10 @@ store_auth(ReqData, Id, Name, Token, TokenSecret) ->
CookieHeader = mochiweb_cookies:cookie(?AUTH_COOKIE, Value, Options),
wrq:merge_resp_headers([CookieHeader], ReqData).
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
+
decode(CookieValue) ->
{Value={Id, Name, Expire, SecretInfo}, Salt, Sign} = binary_to_term(base64:decode(CookieValue)),
case crypto:sha_mac(?AUTH_SECRET, term_to_binary([Value, Salt])) of
@@ -72,3 +80,4 @@ encrypt(Value) ->
decrypt(Value) ->
[V, ?AUTH_SALT] = binary_to_term(crypto:aes_ctr_decrypt(?ENC_KEY, ?ENC_IV, Value)),
V.
+
View
33 apps/csd_web/src/csd_web.erl
@@ -1,19 +1,15 @@
-%% @author OJ Reeves <oj@buffered.io>
-%% @copyright 2012 OJ Reeves.
-
-%% @doc csd_web startup code
-
-module(csd_web).
-author('OJ Reeves <oj@buffered.io>').
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([start/0, start_link/0, stop/0]).
-ensure_started(App) ->
- case application:start(App) of
- ok ->
- ok;
- {error, {already_started, App}} ->
- ok
- end.
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
%% @spec start_link() -> {ok,Pid::pid()}
%% @doc Starts the app for inclusion in a supervisor tree
@@ -39,6 +35,10 @@ stop() ->
application:stop(inets),
Res.
+%% --------------------------------------------------------------------------------------
+%% Privae Function Definitions
+%% --------------------------------------------------------------------------------------
+
start_common() ->
ensure_started(inets),
ensure_started(crypto),
@@ -48,3 +48,12 @@ start_common() ->
application:set_env(webmachine, webmachine_logger_module, webmachine_logger),
ensure_started(webmachine),
ok.
+
+ensure_started(App) ->
+ case application:start(App) of
+ ok ->
+ ok;
+ {error, {already_started, App}} ->
+ ok
+ end.
+
View
22 apps/csd_web/src/csd_web_app.erl
@@ -1,21 +1,25 @@
-%% @author author <author@example.com>
-%% @copyright YYYY author.
-
-%% @doc Callbacks for the csd_web application.
-
-module(csd_web_app).
--author('author <author@example.com>').
+-author('OJ Reeves <oj@buffered.io>').
-behaviour(application).
--export([start/2,stop/1]).
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([start/2, stop/1]).
+
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
%% @spec start(_Type, _StartArgs) -> ServerRet
%% @doc application start callback for csd_web.
start(_Type, _StartArgs) ->
- csd_web_sup:start_link().
+ csd_web_sup:start_link().
%% @spec stop(_State) -> ServerRet
%% @doc application stop callback for csd_web.
stop(_State) ->
- ok.
+ ok.
+
View
19 apps/csd_web/src/csd_web_callback_resource.erl
@@ -1,14 +1,22 @@
-%% @author OJ Reeves <oj@buffered.io>
-%% @copyright 2012 OJ Reeves
-
-module(csd_web_callback_resource).
-
-author('OJ Reeves <oj@buffered.io>').
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([init/1, resource_exists/2, previously_existed/2, moved_temporarily/2]).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
{ok, undefined}.
@@ -19,9 +27,6 @@ previously_existed(ReqData, State) ->
{true, ReqData, State}.
moved_temporarily(ReqData, State) ->
- handle_callback(ReqData, State).
-
-handle_callback(ReqData, State) ->
ReqToken = wrq:get_qs_value("oauth_token", ReqData),
ReqTokenSecret = wrq:get_qs_value("oauth_token_secret", ReqData),
Verifier = wrq:get_qs_value("oauth_verifier", ReqData),
View
13 apps/csd_web/src/csd_web_request_resource.erl
@@ -1,10 +1,22 @@
-module(csd_web_request_resource).
-author('OJ Reeves <oj@buffered.io>').
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([init/1, resource_exists/2, previously_existed/2, moved_temporarily/2]).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
{ok, undefined}.
@@ -17,3 +29,4 @@ previously_existed(ReqData, State) ->
moved_temporarily(ReqData, State) ->
{ok, Url} = twitter:request_access(),
{{true, Url}, ReqData, State}.
+
View
16 apps/csd_web/src/csd_web_snippet_resource.erl
@@ -1,13 +1,26 @@
-module(csd_web_snippet_resource).
-author('OJ Reeves <oj@buffered.io>').
--export([init/1,
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([
+ init/1,
content_types_provided/2,
to_json/2
]).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
{ok, undefined}.
@@ -38,3 +51,4 @@ to_json(ReqData, State) ->
]),
{Json, ReqData, State}.
+
View
40 apps/csd_web/src/csd_web_snippet_submit_resource.erl
@@ -1,35 +1,50 @@
-module(csd_web_snippet_submit_resource).
-author('OJ Reeves <oj@buffered.io>').
--export([init/1,
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([
+ init/1,
allowed_methods/2,
content_types_accepted/2,
is_authorized/2,
process_form/2,
post_is_create/2,
- create_path/2,
- to_html/2
+ create_path/2
]).
+%% --------------------------------------------------------------------------------------
+%% Internal Record Definitions
+%% --------------------------------------------------------------------------------------
+
-record(state, {
user_data = undefined,
key
}).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
{ok, #state{}}.
content_types_accepted(ReqData, State=#state{}) ->
Types = [
- {"text/html", to_html},
{"application/x-www-form-urlencoded", process_form}
],
{Types, ReqData, State}.
allowed_methods(ReqData, State=#state{}) ->
- {['GET', 'POST'], ReqData, State}.
+ {['POST'], ReqData, State}.
is_authorized(ReqData, State=#state{}) ->
case cookie:load_auth(ReqData) of
@@ -54,16 +69,15 @@ process_form(ReqData, State=#state{}) ->
Snippet = to_snippet(FormData, State),
{ok, SavedSnippet} = csd_snippet:save(Snippet),
Key = csd_snippet:get_key(SavedSnippet),
- NewReqData = wrq:set_resp_header("Content-type", "text/plain", wrq:set_resp_body(Key, ReqData)),
+
+ % Return the key of the snippet as the payload
+ NewBody = wrq:set_resp_body(Key, ReqData),
+ NewReqData = wrq:set_resp_header("Content-type", "text/plain", NewBody),
{true, NewReqData, State}.
-to_html(ReqData, State=#state{}) ->
- TemplateData = [
- % post back to the same URL
- {post_url, wrq:path(ReqData)}
- ],
- {ok, Content} = snippet_submit_dtl:render(TemplateData),
- {Content, ReqData, State}.
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
to_snippet(FormData, #state{key=Key, user_data={UserId, _, _, _}}) ->
Title = proplists:get_value("title", FormData),
View
25 apps/csd_web/src/csd_web_user_detail_resource.erl
@@ -1,30 +1,40 @@
-module(csd_web_user_detail_resource).
-author('OJ Reeves <oj@buffered.io>').
--export([init/1,
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([
+ init/1,
allowed_methods/2,
content_types_provided/2,
to_json/2
]).
--record(state, {
- }).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
- {ok, #state{}}.
+ {ok, undefined}.
-content_types_provided(ReqData, State=#state{}) ->
+content_types_provided(ReqData, State) ->
Types = [
{"application/json", to_json}
],
{Types, ReqData, State}.
-allowed_methods(ReqData, State=#state{}) ->
+allowed_methods(ReqData, State) ->
{['GET'], ReqData, State}.
-to_json(ReqData, State=#state{}) ->
+to_json(ReqData, State) ->
PathInfo = wrq:path_info(ReqData),
{ok, UserId} = dict:find(user_id, PathInfo),
{ok, Snippets} = csd_snippet:list_for_user(UserId),
@@ -34,3 +44,4 @@ to_json(ReqData, State=#state{}) ->
]},
Json = mochijson2:encode(UserData),
{Json, ReqData, State}.
+
View
15 apps/csd_web/src/csd_web_vote_resource.erl
@@ -1,14 +1,27 @@
-module(csd_web_vote_resource).
-author('OJ Reeves <oj@buffered.io>').
--export([init/1,
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([
+ init/1,
allowed_methods/2,
content_types_provided/2,
to_json/2
]).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
{ok, undefined}.
View
19 apps/csd_web/src/csd_web_vote_submit_resource.erl
@@ -1,18 +1,35 @@
-module(csd_web_vote_submit_resource).
-author('OJ Reeves <oj@buffered.io>').
--export([init/1,
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
+-export([
+ init/1,
allowed_methods/2,
is_authorized/2,
process_post/2
]).
+%% --------------------------------------------------------------------------------------
+%% Internal Record Definitions
+%% --------------------------------------------------------------------------------------
+
-record(state, {
user_data = undefined
}).
+%% --------------------------------------------------------------------------------------
+%% Required Includes
+%% --------------------------------------------------------------------------------------
+
-include_lib("webmachine/include/webmachine.hrl").
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
init([]) ->
io:format("init~n", []),
{ok, #state{}}.
View
17 apps/csd_web/src/twitter.erl
@@ -1,12 +1,16 @@
-%% @author OJ Reeves <oj@buffered.io>
-%% @copyright 2012 OJ Reeves
-
-module(twitter).
-
-author('OJ Reeves <oj@buffered.io>').
+%% --------------------------------------------------------------------------------------
+%% API Function Exports
+%% --------------------------------------------------------------------------------------
+
-export([request_access/0, verify_access/3, get_current_user_info/2]).
+%% --------------------------------------------------------------------------------------
+%% API Function Definitions
+%% --------------------------------------------------------------------------------------
+
request_access() ->
TwitterConf = conf:get_section(twitter),
RequestTokenUrl = proplists:get_value(request_token_url, TwitterConf),
@@ -29,6 +33,10 @@ verify_access(RequestToken, RequestTokenSecret, Verifier) ->
get_current_user_info(AccessToken, AccessTokenSecret) ->
call_json_service(current_user_info_url, AccessToken, AccessTokenSecret).
+%% --------------------------------------------------------------------------------------
+%% Private Function Definitions
+%% --------------------------------------------------------------------------------------
+
%% Extract a oauth-formatted consumer tuple from the given Twitter configuration.
consumer(TwitterConf) ->
ConsumerKey = proplists:get_value(consumer_key, TwitterConf),
@@ -42,3 +50,4 @@ call_json_service(UrlKey, AccessToken, AccessTokenSecret) ->
{ok, Response} = oauth:get(Url, [], consumer(TwitterConf), AccessToken, AccessTokenSecret),
{{_Version, 200, "OK"}, _Headers, Json} = Response,
{ok, Json}.
+
Please sign in to comment.
Something went wrong with that request. Please try again.